diff options
-rw-r--r-- | bashrc.dot.link | 13 | ||||
-rw-r--r-- | profile.dot.link | 13 |
2 files changed, 14 insertions, 12 deletions
diff --git a/bashrc.dot.link b/bashrc.dot.link index ed3e361..ab85f71 100644 --- a/bashrc.dot.link +++ b/bashrc.dot.link @@ -1,17 +1,6 @@ # -# Bash rc file +# Bash initialization # -# See http://superuser.com/questions/90535/how-do-i-turn-of-auto-echo-in-bash-when-i-cd -function cd { - if [ -z "$*" ]; then - destination=~ - else - destination=$* - fi - - builtin cd "${destination}" > /dev/null -} - # Load the profile . $HOME/.profile diff --git a/profile.dot.link b/profile.dot.link index ef4c187..4beea3c 100644 --- a/profile.dot.link +++ b/profile.dot.link @@ -31,6 +31,19 @@ export PATH=$PATH # See http://www.caliban.org/bash/#bashtips export CDPATH=".:~:~/code:~/data:~/file:~/apps:/var/www/data" +# See http://superuser.com/questions/90535/how-do-i-turn-of-auto-echo-in-bash-when-i-cd +if [ ! -z "$BASH" ]; then + function cd { + if [ -z "$*" ]; then + destination=~ + else + destination=$* + fi + + builtin cd "${destination}" > /dev/null + } +fi + # Editor variables, avoiding "Avoiding protocol specified" error export EDITOR="vim -X" |