diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-08-05 15:08:36 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-08-05 15:08:36 +1200 |
commit | b981015fc7154f70429740f1ed11284918fd3c30 (patch) | |
tree | 72325510cd9a0ae81df0e8b296aa3c6842f1103d /bash/bashrc.d | |
parent | More intelligent trailing-slash filtering (diff) | |
download | dotfiles-b981015fc7154f70429740f1ed11284918fd3c30.tar.gz dotfiles-b981015fc7154f70429740f1ed11284918fd3c30.zip |
Fix a logic bug
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 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 |