mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
fixed issue with POWERLEVEL9K_PUBLIC_IP_NONE being empty
This commit is contained in:
parent
6e1e4ac241
commit
f33f843e92
1 changed files with 1 additions and 1 deletions
|
@ -441,7 +441,7 @@ prompt_public_ip() {
|
||||||
timediff=$(($(date +%s) - $(date -r $POWERLEVEL9K_PUBLIC_IP_FILE +%s)))
|
timediff=$(($(date +%s) - $(date -r $POWERLEVEL9K_PUBLIC_IP_FILE +%s)))
|
||||||
[[ $timediff -gt $POWERLEVEL9K_PUBLIC_IP_TIMOUT ]] && refresh_ip=true
|
[[ $timediff -gt $POWERLEVEL9K_PUBLIC_IP_TIMOUT ]] && refresh_ip=true
|
||||||
# If tmp file is empty get a fresh IP
|
# 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
|
else
|
||||||
touch $POWERLEVEL9K_PUBLIC_IP_FILE && refresh_ip=true
|
touch $POWERLEVEL9K_PUBLIC_IP_FILE && refresh_ip=true
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue