mirror of
https://github.com/eepykate/fet.sh.git
synced 2026-11-17 19:30:18 +00:00
less obfuscation in eq()
This commit is contained in:
1 parent
43152b2837
commit
eede5b7666
1 file changed
+3
-4
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user