Merge pull request #905 from robobenklein/robobenklein/defined-variable-performance-hotfix

[performance] Defined function 2-20 times speedup
This commit is contained in:
Ben Hilburn
2018-07-13 13:25:45 -04:00
committed by GitHub
2 changed files with 2 additions and 4 deletions
+1 -1
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