1
0
Fork 0
mirror of synced 2024-11-26 17:25:35 -05:00

Inline is-true function body, as other functions

defined in Zim. Instead of creating an additional `is-true() { }`
function scope.
This commit is contained in:
Eric Nielsen 2017-03-09 10:53:43 -05:00
parent 4b95df9a5f
commit f2ccc22531

View file

@ -1,5 +1,3 @@
# Checks a boolean variable for "true".
# Case insensitive: "1", "y", "yes", "t", "true", "o", and "on".
is-true() {
[[ -n "$1" && "$1" == (1|[Yy]([Ee][Ss]|)|[Tt]([Rr][Uu][Ee]|)|[Oo]([Nn]|)) ]]
}
[[ -n "$1" && "$1" == (1|[Yy]([Ee][Ss]|)|[Tt]([Rr][Uu][Ee]|)|[Oo]([Nn]|)) ]]