aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-02-21 10:44:58 -0800
committerKaz Kylheku <kaz@kylheku.com>2025-02-21 10:44:58 -0800
commit38e65cfbec05fc4baabed8a24d6692dfad78ba5c (patch)
treeb9755e8aa8268b363cc09c7d3d325720da34e903
parentd4aec2c73cbf130f8c7ef174340eb959ca52fd7f (diff)
downloadcdlog-master.tar.gz
cdlog-master.tar.bz2
cdlog-master.zip
cdunalias: improve test for undefined alias.HEADmaster
* cdlog.sh (cdlog.unalias); Improve the test for undefined alias, which is wrongly treating empty as undefined.
-rw-r--r--cdlog.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/cdlog.sh b/cdlog.sh
index feebfda..2721550 100644
--- a/cdlog.sh
+++ b/cdlog.sh
@@ -503,7 +503,7 @@ cdlog.unalias()
local alias
for alias in "$@"; do
- if [ -n "${cdlog_alias[$alias]-}" ]; then
+ if [ "${cdlog_alias[$alias]+y}" == y ]; then
unset cdlog_alias[$alias]
else
printf "no such cdlog alias: %s\n" "$alias"