aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2016-10-03 09:22:44 +0200
committerGravatar Tom van der Lee <t0m.vd.l33@gmail.com>2016-10-03 09:22:44 +0200
commit1c99670e651c642ae2b5a15c464ce7810653e18c (patch)
tree1b6d61f8af46138627f3c5721ed29c5bb319c6bd
parenta0cd437760188a704f2d77a66ee081561431043c (diff)
downloaddotfiles-1c99670e651c642ae2b5a15c464ce7810653e18c.tar.gz
dotfiles-1c99670e651c642ae2b5a15c464ce7810653e18c.tar.bz2
dotfiles-1c99670e651c642ae2b5a15c464ce7810653e18c.zip
Fixes for macOS
-rwxr-xr-xbash/.bashrc25
1 files changed, 10 insertions, 15 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index 25b7651..d9f3a6c 100755
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -24,14 +24,10 @@ case "$(uname)" in
24 alias ls="ls --color=auto" 24 alias ls="ls --color=auto"
25 usr="/usr" 25 usr="/usr"
26 ;; 26 ;;
27 FreeBSD) 27 FreeBSD|Darwin)
28 alias ls="ls -G" 28 alias ls="ls -G"
29 usr="/usr/local" 29 usr="/usr/local"
30 ;; 30 ;;
31 *)
32 alias ls="ls --color=auto"
33 usr="/usr"
34 ;;
35esac 31esac
36 32
37# Colorfull manpages 33# Colorfull manpages
@@ -91,10 +87,10 @@ elif exists vi; then
91fi 87fi
92 88
93vim() { 89vim() {
94 vim_bin=$(whereis -b -B $(sed "s/:/ /g" <(echo $PATH)) -f $EDITOR | cut -d' ' -f2-) 90 vim_bin=$(which $EDITOR)
95 if [[ -z $@ ]]; then 91 if [[ -z "$@" ]]; then
96 $vim_bin 92 $vim_bin
97 elif [[ -d $@ ]]; then 93 elif [[ -d "$@" ]]; then
98 dir=$(pwd) 94 dir=$(pwd)
99 cd $@ && $vim_bin && cd $dir 95 cd $@ && $vim_bin && cd $dir
100 else 96 else
@@ -109,8 +105,8 @@ if exists go; then
109fi 105fi
110 106
111if exists gem; then 107if exists gem; then
112 export GEM_HOME="$(ruby -e 'print Gem.user_dir')/bin" 108 export GEM_HOME="$(ruby -e 'print Gem.user_dir')"
113 export PATH="$PATH:$GEM_HOME" 109 export PATH="$PATH:$GEM_HOME/bin"
114fi 110fi
115 111
116# Ezjail shortcuts 112# Ezjail shortcuts
@@ -122,8 +118,7 @@ fi
122 118
123# Showbanned ipadresses 119# Showbanned ipadresses
124if exists pfctl && exists sudo; then 120if exists pfctl && exists sudo; then
125 showbanned () 121 showbanned () {
126 {
127 for table in "fail2ban" "permaban"; do 122 for table in "fail2ban" "permaban"; do
128 banned=$(sudo pfctl -t $table -T show 2> /dev/null) 123 banned=$(sudo pfctl -t $table -T show 2> /dev/null)
129 124
@@ -151,7 +146,7 @@ fi
151# Set the virtualenv parameters 146# Set the virtualenv parameters
152if exists virtualenvwrapper.sh; then 147if exists virtualenvwrapper.sh; then
153 export WORKON_HOME=$HOME/.virtualenvs 148 export WORKON_HOME=$HOME/.virtualenvs
154 source $use/bin/virtualenvwrapper.sh 149 source $(which virtualenvwrapper.sh) 2> /dev/null
155fi 150fi
156 151
157# Start gnome-keyring-daemon 152# Start gnome-keyring-daemon
@@ -164,7 +159,7 @@ fi
164 159
165# Fancy bash prompt 160# Fancy bash prompt
166if exists liquidprompt; then 161if exists liquidprompt; then
167 source liquidprompt 162 source $(which liquidprompt) 2> /dev/null
168fi 163fi
169 164
170# Fancy system info 165# Fancy system info
@@ -174,4 +169,4 @@ elif exists screenfetch; then
174 screenfetch 169 screenfetch
175fi 170fi
176 171
177# vim: set ts=8 sw=8 tw=0 noet : 172# vim: set ts=4 sw=4 tw=0 noet :