diff options
-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 0f1eb165..62f1a905 100644 --- a/bash/bashrc.d/cd.bash +++ b/bash/bashrc.d/cd.bash @@ -1,7 +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 OPTIND=0 opt local -a opts while getopts elP opt; do opts[${#opts[@]}]=-$opt |