aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-08-05 15:08:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-08-05 15:08:36 +1200
commitb981015fc7154f70429740f1ed11284918fd3c30 (patch)
tree72325510cd9a0ae81df0e8b296aa3c6842f1103d
parentMore intelligent trailing-slash filtering (diff)
downloaddotfiles-b981015fc7154f70429740f1ed11284918fd3c30.tar.gz
dotfiles-b981015fc7154f70429740f1ed11284918fd3c30.zip
Fix a logic bug
-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 2b0f1a53..5d26e2b9 100644
--- a/bash/bashrc.d/bd.bash
+++ b/bash/bashrc.d/bd.bash
@@ -50,7 +50,8 @@ bd() {
# Anything else with a leading / needs to anchor to the start of the
# path
/*)
- if [[ ${PWD%*/} != "$dir"/* ]] ; then
+ dir=$req
+ if [[ $PWD != "$dir"/* ]] ; then
printf 'bash: %s: Directory name not in path\n' \
"$FUNCNAME" >&2
return 1