mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-25 00:21:58 +00:00
work around a bug in zsh that percent-expands %1F{2}
as if it was %F{2}
; fixes #270
This commit is contained in:
parent
94de8519b4
commit
f2cd89ed70
1 changed files with 5 additions and 6 deletions
|
@ -444,11 +444,10 @@ _p9k_background() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_p9k_foreground() {
|
_p9k_foreground() {
|
||||||
case $1 in
|
# Note: This code used to produce `%1F` instead of `%F{1}` because it's more efficient.
|
||||||
'') _p9k_ret="%f";;
|
# Unfortunately, this triggers a bug in zsh. Namely, `%1F{2}` gets percent-expanded as if
|
||||||
'#'*) _p9k_ret="%F{$1}";;
|
# it was `%F{2}`.
|
||||||
*) _p9k_ret="%${1}F";;
|
[[ -n $1 ]] && _p9k_ret="%F{$1}" || _p9k_ret="%k"
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_p9k_escape_style() {
|
_p9k_escape_style() {
|
||||||
|
|
Loading…
Reference in a new issue