aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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