aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/bd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/shrc.d/bd.sh')
-rw-r--r--sh/shrc.d/bd.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/sh/shrc.d/bd.sh b/sh/shrc.d/bd.sh
index 1b253e3d..29bde513 100644
--- a/sh/shrc.d/bd.sh
+++ b/sh/shrc.d/bd.sh
@@ -28,7 +28,8 @@ bd() {
case $2 in
*/"$1"|'') break ;;
*/) set -- "$1" "${2%/}" ;;
- *) set -- "$1" "${2%/*}" ;;
+ */*) set -- "$1" "${2%/*}" ;;
+ *) set -- "$1" '' ;;
esac
done
shift