mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 12:20:07 +00:00
Replace typeset
check with shellvar flag
More performance without changing functionality.
This commit is contained in:
parent
002f7b81a1
commit
45b0d68ec4
1 changed files with 1 additions and 3 deletions
|
@ -9,9 +9,7 @@
|
|||
# Exits with 0 if a variable has been previously defined (even if empty)
|
||||
# Takes the name of a variable that should be checked.
|
||||
function defined() {
|
||||
local varname="$1"
|
||||
|
||||
typeset -p "$varname" > /dev/null 2>&1
|
||||
[[ ! -z "${(tP)1}" ]]
|
||||
}
|
||||
|
||||
# Given the name of a variable and a default value, sets the variable
|
||||
|
|
Loading…
Reference in a new issue