diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-04-30 13:51:34 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-04-30 13:51:34 +0300 |
commit | 361eec6f95d31570c77b98f5405efe508592eadd (patch) | |
tree | a124b728f4b5649e6aaeccd535eeb2b1ec66f8a3 /functions | |
parent | 6ef8e2f0cfe726f6df8a47615f50f0c50ac25693 (diff) |
replace all -v checks with equivalents (trying to port to zsh 5.2)
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/icons.zsh | 4 | ||||
-rwxr-xr-x | functions/utilities.zsh | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/functions/icons.zsh b/functions/icons.zsh index ca7b2b0a..d1cccffd 100755 --- a/functions/icons.zsh +++ b/functions/icons.zsh @@ -550,8 +550,8 @@ function _p9k_init_icons() { function print_icon() { local icon_name=$1 local var_name=POWERLEVEL9K_${icon_name} - if [[ -v "$var_name" ]]; then - echo -n "${(P)ICON_USER_VARIABLE}" + if [[ -n "${(tP)var_name}" ]]; then + echo -n "${(P)var_name}" else echo -n "${icons[$icon_name]}" fi diff --git a/functions/utilities.zsh b/functions/utilities.zsh index 7a322e57..9821b287 100755 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -22,7 +22,7 @@ function set_default() { local varname=$1 shift - if [[ -v $varname ]]; then + if [[ -n ${(tP)varname} ]]; then typeset $flags $varname elif [[ "$flags" == *[aA]* ]]; then eval "typeset ${(@q)flags} ${(q)varname}=(${(qq)@})" |