-
Notifications
You must be signed in to change notification settings - Fork 937
[Discussion] Minimum System Requirements #877
Comments
@bhilburn Any thoughts on this? Would be nice to know what the minimum is as it affects not only coding, but also testing |
Yup, I think this is a great idea. We should for sure do this for v0.7.0. @onaforeignshore - You have a great point re: testing. Let's settle on our minimum reqs, here, and then make sure we are testing against that (as well as the latest). So, generally, I like using Ubuntu 16.04 LTS as a good benchmark for minimum requirements, which ships ZSH 5.1.1 by default (see here) - so I think we have to keep our own What else should we cover? Also, it would be good to test for minimum requirements at init and issue an error if they aren't present. |
Too late to keep 5.1. At least for the battery segment.. To keep that, we should rework that condition to use our Other minimum requirements we should document are |
At least for the |
This is what appears to work for me: diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index c1ea754..8b2a217 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 (( ${+POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD} )) && [[ "${bat_percent}" -ge $POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD ]]; then
return
fi |
Closing this, cause we now have that documented in the wiki. |
We never specified any minimum system requirements, but there are implicit requirements. Besides ZSH being the biggest part of this, I didn't want to constrain it to ZSH only.
functions/colors.zsh
need at least ZSH 5.1[[ -v "VARIABLE" ]]
(found here) to test if a variable is declared need at least ZSH 5.3. Workaround is to use our owndefined
fromfunctions/utilities.zsh
. I we decide to go with ZSH 5.3, we could deprecate ourdefined
function.I am sure there are others. I just wanted to collect my findings so we could set up a wiki page. Also, it is important to know what ZSH versions we should test.
The text was updated successfully, but these errors were encountered: