summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorrjorgenson <rjorgenson@gmail.com>2017-01-10 01:00:20 +0300
committerrjorgenson <rjorgenson@gmail.com>2017-01-10 01:00:20 +0300
commitf11ca0664c9d9aba9d456b70058ba64909e1e098 (patch)
tree3bb7a3fa400845317c1635a6679796bc995fd3c3 /powerlevel9k.zsh-theme
parentf33f843e92c565453b253531d9d7be06faaf42fc (diff)
fixed issue with POWERLEVEL9K_PUBLIC_IP_NONE being empty for real
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 2 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 368254ee..78b014e5 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -429,7 +429,7 @@ prompt_battery() {
prompt_public_ip() {
# set default values for segment
set_default POWERLEVEL9K_PUBLIC_IP_TIMOUT "300"
- set_default POWERLEVEL9K_PUBLIC_IP_NONE ""
+ set_default POWERLEVEL9K_PUBLIC_IP_NONE "none"
set_default POWERLEVEL9K_PUBLIC_IP_FILE "/tmp/p9k_public_ip"
set_default POWERLEVEL9K_PUBLIC_IP_HOST "http://ident.me"
@@ -441,7 +441,7 @@ prompt_public_ip() {
timediff=$(($(date +%s) - $(date -r $POWERLEVEL9K_PUBLIC_IP_FILE +%s)))
[[ $timediff -gt $POWERLEVEL9K_PUBLIC_IP_TIMOUT ]] && refresh_ip=true
# If tmp file is empty get a fresh IP
- [[ -z $(cat $POWERLEVEL9K_PUBLIC_IP_FILE) || $(cat $POWERLEVEL9K_PUBLIC_IP_FILE) =~ '$POWERLEVEL9K_PUBLIC_IP_NONE' ]] && refresh_ip=true
+ [[ -z $(cat $POWERLEVEL9K_PUBLIC_IP_FILE) || $(cat $POWERLEVEL9K_PUBLIC_IP_FILE) =~ "$POWERLEVEL9K_PUBLIC_IP_NONE" ]] && refresh_ip=true
else
touch $POWERLEVEL9K_PUBLIC_IP_FILE && refresh_ip=true
fi