summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorBen Klein <robobenklein@gmail.com>2018-07-11 23:19:52 +0300
committerBen Klein <robobenklein@gmail.com>2018-07-11 23:54:12 +0300
commit002f7b81a14def4ce7f1d5ea100825f0b8ebc464 (patch)
tree60d91859329653c997abc853bb072267e307f5ff /powerlevel9k.zsh-theme
parentd031b3e03522d47607173ebda89e7558b622a322 (diff)
Replace [[-v with `defined`
For zsh 5.1 compatibility.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index c1ea754f..f1db3da1 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -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