diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-08-05 12:58:47 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-08-05 12:58:47 +1200 |
commit | 7b36735b0874d1ec968ecc71681a31ea93f89686 (patch) | |
tree | 31c02fd2a18df120ee7722ea9e4780a0435ed99c /bash/bashrc.d | |
parent | Strip unneeded quotes (diff) | |
download | dotfiles-7b36735b0874d1ec968ecc71681a31ea93f89686.tar.gz dotfiles-7b36735b0874d1ec968ecc71681a31ea93f89686.zip |
Start from parent dir when stripping bd()
Diffstat (limited to 'bash/bashrc.d')
-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 |