aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/cd.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-09-09 21:49:12 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-09-09 21:49:12 +1200
commit899cb9446ed369efddae4303fe84e99a543bb8fe (patch)
treec25de5a8e45e26858194329ae209114d5ebb4dfd /bash/bashrc.d/cd.bash
parentPreserve SSH_CLIENT as well as SSH_CONNECTION (diff)
downloaddotfiles-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.bash2
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