diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-10 16:26:42 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-10 16:26:42 +1300 |
commit | 72598bf31e709d96f79024c94619c72ff036cfd0 (patch) | |
tree | 34bdaa62b3255de8811e6d51dbe0ee256584b9e0 /bash/bashrc.d/pushd.bash | |
parent | Remove overengineered tmux args array (diff) | |
download | dotfiles-72598bf31e709d96f79024c94619c72ff036cfd0.tar.gz dotfiles-72598bf31e709d96f79024c94619c72ff036cfd0.zip |
Add a couple of missing option terminators
Diffstat (limited to 'bash/bashrc.d/pushd.bash')
-rw-r--r-- | bash/bashrc.d/pushd.bash | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bash/bashrc.d/pushd.bash b/bash/bashrc.d/pushd.bash index c3e01a5e..6da42fee 100644 --- a/bash/bashrc.d/pushd.bash +++ b/bash/bashrc.d/pushd.bash @@ -1,5 +1,9 @@ # Make pushd default to $HOME if no arguments given, much like cd pushd() { - builtin pushd "${@:-$HOME}" + if (($#)) ; then + builtin pushd "$@" + else + builtin pushd -- "$HOME" + fi } |