Inline is-true function body, as other functions
defined in Zim. Instead of creating an additional `is-true() { }` function scope. Closes #148
This commit is contained in:
parent
4b95df9a5f
commit
c7b2232378
1 changed files with 1 additions and 3 deletions
|
@ -1,5 +1,3 @@
|
||||||
# Checks a boolean variable for "true".
|
# Checks a boolean variable for "true".
|
||||||
# Case insensitive: "1", "y", "yes", "t", "true", "o", and "on".
|
# 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]|)) ]]
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue