1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-11 00:00:06 +00:00

Replace [[-v with defined

For zsh 5.1 compatibility.
This commit is contained in:
Ben Klein 2018-07-11 16:19:52 -04:00
parent d031b3e035
commit 002f7b81a1
No known key found for this signature in database
GPG key ID: 5DE420E03F5429EA

View file

@ -498,7 +498,7 @@ prompt_battery() {
fi
fi
# return if POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD is set and the battery percentage is greater or equal
if [[ -v "POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD" && "${bat_percent}" -ge $POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD ]]; then
if defined POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD && [[ "${bat_percent}" -ge $POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD ]]; then
return
fi