diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-05-26 15:33:55 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-05-26 15:33:55 +1200 |
commit | 2eb610513889b2c9653c4481647007f189f98096 (patch) | |
tree | c241f8a550badbcf074482d41add84a57e884bf6 | |
parent | Emulate zsh dir replacement feature (diff) | |
download | dotfiles-2eb610513889b2c9653c4481647007f189f98096.tar.gz dotfiles-2eb610513889b2c9653c4481647007f189f98096.zip |
Handle null arguments to cd
-rw-r--r-- | bash/bashrc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bash/bashrc b/bash/bashrc index b65f86ff..c062e20c 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -152,8 +152,10 @@ alias diff='diff -u' function cd { if [[ -n "$2" ]]; then builtin cd "${PWD/$1/$2}" + elif [[ -n "$1" ]]; then + builtin cd "$1" else - builtin cd "$*" + builtin cd fi } |