aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc.d/cd.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/bash/bashrc.d/cd.bash b/bash/bashrc.d/cd.bash
index 6c2e463f..860b65b5 100644
--- a/bash/bashrc.d/cd.bash
+++ b/bash/bashrc.d/cd.bash
@@ -3,10 +3,10 @@
__cd() {
local -a opts
while getopts elP opt; do
- opts["${#opts[@]}"]="-$opt"
+ opts[${#opts[@]}]="-$opt"
done
- shift "$(($OPTIND-1))"
- if [[ "$#" -eq 2 ]]; then
+ shift $(($OPTIND-1))
+ if [[ $# -eq 2 ]]; then
if [[ "$PWD" == *"$1"* ]]; then
builtin cd "${opts[@]}" "${PWD/$1/$2}"
else