diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-08-20 14:07:25 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-08-20 14:07:25 +1200 |
commit | c07355eff9cb528cd97736fef5b2c4b29056f635 (patch) | |
tree | 40737c0134f121da9b859bb8f1ae079a6bd9fd62 /bash/bashrc.d/cd.bash | |
parent | More conservative expansion for dotfile paths (diff) | |
download | dotfiles-c07355eff9cb528cd97736fef5b2c4b29056f635.tar.gz dotfiles-c07355eff9cb528cd97736fef5b2c4b29056f635.zip |
Fix a few variable contamination issues
Diffstat (limited to 'bash/bashrc.d/cd.bash')
-rw-r--r-- | bash/bashrc.d/cd.bash | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bash/bashrc.d/cd.bash b/bash/bashrc.d/cd.bash index 320d614b..1b52fc01 100644 --- a/bash/bashrc.d/cd.bash +++ b/bash/bashrc.d/cd.bash @@ -1,6 +1,7 @@ # If given two arguments to cd, replace the first with the second in $PWD, # emulating a Zsh function that I often find useful; preserves options too __cd() { + local opt OPTERR OPTIND local -a opts while getopts elP opt; do opts[${#opts[@]}]=-$opt |