diff options
Diffstat (limited to 'bash/bashrc.d/bd.bash')
-rw-r--r-- | bash/bashrc.d/bd.bash | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bash/bashrc.d/bd.bash b/bash/bashrc.d/bd.bash index e77cda49..868308fa 100644 --- a/bash/bashrc.d/bd.bash +++ b/bash/bashrc.d/bd.bash @@ -4,7 +4,8 @@ bd() { # If there are no arguments, we just move up one directory (cd ..) if (($#)) ; then - dir=${PWD%/$1*}/$1 + dir=${PWD%/*} + dir=${dir%/$1*}/$1 else dir=.. fi |