1
0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-12 19:18:28 +02:00

Use defined to check if ICON_USER_VARIABLE is defined.

This commit is contained in:
John Koelndorfer 2015-09-01 18:55:14 -05:00
parent 893bfe243d
commit 378b910af6

View File

@ -60,7 +60,7 @@ function print_icon() {
local icon_name=$1
local ICON_USER_VARIABLE=POWERLEVEL9K_${icon_name}
local USER_ICON=${(P)ICON_USER_VARIABLE}
if [[ -n "$USER_ICON" ]]; then
if defined "$ICON_USER_VARIABLE"; then
echo -n $USER_ICON
else
echo -n ${icons[$icon_name]}