aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/pushd.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-10-10 16:26:42 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-10-10 16:26:42 +1300
commit72598bf31e709d96f79024c94619c72ff036cfd0 (patch)
tree34bdaa62b3255de8811e6d51dbe0ee256584b9e0 /bash/bashrc.d/pushd.bash
parentRemove overengineered tmux args array (diff)
downloaddotfiles-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.bash6
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
}