diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-09 21:49:12 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-09 21:49:12 +1200 |
commit | 899cb9446ed369efddae4303fe84e99a543bb8fe (patch) | |
tree | c25de5a8e45e26858194329ae209114d5ebb4dfd /bash/bashrc.d/cd.bash | |
parent | Preserve SSH_CLIENT as well as SSH_CONNECTION (diff) | |
download | dotfiles-899cb9446ed369efddae4303fe84e99a543bb8fe.tar.gz dotfiles-899cb9446ed369efddae4303fe84e99a543bb8fe.zip |
Better syntax for array append
Diffstat (limited to 'bash/bashrc.d/cd.bash')
-rw-r--r-- | bash/bashrc.d/cd.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bashrc.d/cd.bash b/bash/bashrc.d/cd.bash index f16aad41..6d7e2573 100644 --- a/bash/bashrc.d/cd.bash +++ b/bash/bashrc.d/cd.bash @@ -4,7 +4,7 @@ cd() { local opt OPTIND=0 local -a opts while getopts elP opt; do - opts[${#opts[@]}]=-$opt + opts=("${opts[@]}" -"$opt") done shift $((OPTIND-1)) if (($# == 2)); then |