less obfuscation in eq()

This commit is contained in:
gk committed 2020-10-13 07:10:12 +10:00
1 parent 43152b2837
commit eede5b7666
1 file changed
+3 -4
+3 -4
View File
@@ -9,10 +9,9 @@ exec 2>/dev/null
set -- set --
eq() { # equals | [ a = b ] with globbing eq() { # equals | [ a = b ] with globbing
case $1 in case $1 in
# if the second argument matches the first, exit normally $2) ;;
$2) return *) return 1;;
# if it doesn't match, reverse the output of `:`, which makes an error esac
esac;! :
} }
## DE ## DE