lib: speed up slow parts of the lib files; other small fixes

This commit is contained in:
Marc Cornellà
2020-04-05 21:34:53 +02:00
parent dbd16000a5
commit 0caae9082a
4 changed files with 24 additions and 26 deletions

View File

@@ -89,7 +89,7 @@ function default() {
# 0 if the env variable exists, 3 if it was set
#
function env_default() {
(( ${${(@f):-$(typeset +xg)}[(I)$1]} )) && return 0
[[ ${parameters[$1]} = *-export* ]] && return 0
export "$1=$2" && return 3
}