1
0
Fork 0
mirror of synced 2024-06-26 02:11:09 -04:00
zimfw/modules/git/functions/is-true
Eric Nielsen c7b2232378 Inline is-true function body, as other functions
defined in Zim. Instead of creating an additional `is-true() { }`
function scope.

Closes #148
2017-03-27 13:56:45 -07:00

4 lines
182 B
Plaintext

# 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]|)) ]]