aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-02-25 18:34:46 -0800
committerKaz Kylheku <kaz@kylheku.com>2024-02-25 18:34:46 -0800
commitc26cfa40f6f9e162195d15b987b3e7e45ce6406b (patch)
tree25b14faa5c5b51a89522b5877e53b4a7b1150fad
parentaaaf88bf43bfc6730cd11d43e088b72391a8c968 (diff)
downloadcdlog-c26cfa40f6f9e162195d15b987b3e7e45ce6406b.tar.gz
cdlog-c26cfa40f6f9e162195d15b987b3e7e45ce6406b.tar.bz2
cdlog-c26cfa40f6f9e162195d15b987b3e7e45ce6406b.zip
Bugfix: handle empty argument in cdlog.chdir.
* cdlog.sh (cdlog.chdir): Do not treat an empty argument as a valid alias. In that case just return.
-rw-r--r--cdlog.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/cdlog.sh b/cdlog.sh
index 652efaf..0a9b032 100644
--- a/cdlog.sh
+++ b/cdlog.sh
@@ -152,12 +152,15 @@ cdlog.chdir()
case $2 in
( */* )
;;
- ( * )
+ ( ?* )
def=${cdlog_alias[$2]}
if [ -n "$def" ] ; then
set -- -P "$def"
fi
;;
+ ( * )
+ return 0
+ ;;
esac
fi