mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-21 23:01:57 +00:00
correctly handle zsh 5.4.2 whose ZSH_PATCHLEVEL does not start with "zsh"
This commit is contained in:
parent
ecb5c098a2
commit
4dad2d81ff
1 changed files with 1 additions and 3 deletions
|
@ -2326,11 +2326,9 @@ _p9k_init_timer() {
|
||||||
# Test: PROMPT="${(pl:$((COLUMNS))::-:)}<%1(l.%2(l.FAIL.PASS).FAIL)> " zsh -dfis <<<exit
|
# 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
|
# Workaround: PROMPT="${(pl:$((COLUMNS))::-:)}%{%G%}<%1(l.%2(l.FAIL.PASS).FAIL)> " zsh -dfis <<<exit
|
||||||
function _p9k_prompt_overflow_bug() {
|
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 ))
|
[[ $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 ))
|
[[ $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
|
# Some people write POWERLEVEL9K_DIR_PATH_SEPARATOR='\uNNNN' instead of
|
||||||
|
|
Loading…
Reference in a new issue