1
0
Fork 0
mirror of synced 2024-11-27 09:45:34 -05:00
zimfw/modules/git/functions/is-true
Eric Nielsen f2ccc22531 Inline is-true function body, as other functions
defined in Zim. Instead of creating an additional `is-true() { }`
function scope.
2017-03-09 10:53:43 -05:00

3 lines
182 B
Text

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