You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
336 B
11 lines
336 B
14 years ago
|
# Checks if a file can be autoloaded by trying to load it in a subshell.
|
||
|
function autoloadable() {
|
||
|
( unfunction $1 ; autoload -U +X $1 ) &>/dev/null
|
||
|
}
|
||
|
|
||
|
# Checks boolean variable for "true" (case insensitive "1", "y", "yes", "t", and "true").
|
||
|
function check-bool {
|
||
|
[[ -n "$1" && "$1" == (1|[Yy]([Ee][Ss]|)|[Tt]([Rr][Uu][Ee]|)) ]]
|
||
|
}
|
||
|
|