summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2018-07-13 20:25:45 +0300
committerGitHub <noreply@github.com>2018-07-13 20:25:45 +0300
commita7b3f310d3c1e5306332dd15401efb9631c76bed (patch)
treef86464cadab0cfa107e9137d0141a4511de2db77 /powerlevel9k.zsh-theme
parente1a420b5d20b11da108b202eb7020437869a28a8 (diff)
parent45b0d68ec435a89ccc13193149a5bc306d449d04 (diff)
Merge pull request #905 from robobenklein/robobenklein/defined-variable-performance-hotfix
[performance] Defined function 2-20 times speedup
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 ab56d234..f3126b81 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