mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 08:20:10 +00:00
replace all -v checks with equivalents (trying to port to zsh 5.2)
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
@@ -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)@})"
|
||||
|
||||
Reference in New Issue
Block a user