aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-08-05 12:58:47 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-08-05 12:58:47 +1200
commit7b36735b0874d1ec968ecc71681a31ea93f89686 (patch)
tree31c02fd2a18df120ee7722ea9e4780a0435ed99c /bash
parentStrip unneeded quotes (diff)
downloaddotfiles-7b36735b0874d1ec968ecc71681a31ea93f89686.tar.gz
dotfiles-7b36735b0874d1ec968ecc71681a31ea93f89686.zip
Start from parent dir when stripping bd()
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/bd.bash3
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