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 | |
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')
-rw-r--r-- | bash/bashrc.d/pushd.bash | 6 | ||||
-rw-r--r-- | bash/bashrc.d/pwgen.bash | 2 |
2 files changed, 6 insertions, 2 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 } diff --git a/bash/bashrc.d/pwgen.bash b/bash/bashrc.d/pwgen.bash index f3ab323b..df39274f 100644 --- a/bash/bashrc.d/pwgen.bash +++ b/bash/bashrc.d/pwgen.bash @@ -9,7 +9,7 @@ pwgen() { if (($#)) ; then command pwgen "$@" else - command pwgen -s "${PWGEN_LENGTH:-15}" "${PWGEN_COUNT:-1}" + command pwgen -s -- "${PWGEN_LENGTH:-15}" "${PWGEN_COUNT:-1}" fi } |