diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-05-30 11:46:08 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-05-30 11:46:08 +0300 |
commit | 4dad2d81ffb7e6c59df04599865adf4393905dcf (patch) | |
tree | 3d04ed1209fab426d7b8eae6065950e84f76478a /powerlevel9k.zsh-theme | |
parent | ecb5c098a21fc512dee1d81e3d5532ee006abf17 (diff) |
correctly handle zsh 5.4.2 whose ZSH_PATCHLEVEL does not start with "zsh"
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 7dcd2516..8acd7397 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -2326,11 +2326,9 @@ _p9k_init_timer() { # Test: PROMPT="${(pl:$((COLUMNS))::-:)}<%1(l.%2(l.FAIL.PASS).FAIL)> " zsh -dfis <<<exit # Workaround: PROMPT="${(pl:$((COLUMNS))::-:)}%{%G%}<%1(l.%2(l.FAIL.PASS).FAIL)> " zsh -dfis <<<exit function _p9k_prompt_overflow_bug() { - is-at-least 5.4.2 || return 1 [[ $ZSH_PATCHLEVEL =~ '^zsh-5\.4\.2-([0-9]+)-' ]] && return $(( match[1] < 159 )) - is-at-least 5.7.2 && return 1 [[ $ZSH_PATCHLEVEL =~ '^zsh-5\.7\.1-([0-9]+)-' ]] && return $(( match[1] >= 50 )) - return 0 + is-at-least 5.5 && ! is-at-least 5.7.2 } # Some people write POWERLEVEL9K_DIR_PATH_SEPARATOR='\uNNNN' instead of |