diff options
author | Oliver Kiddle <okiddle@yahoo.co.uk> | 2020-06-11 22:34:41 +0200 |
---|---|---|
committer | Oliver Kiddle <okiddle@yahoo.co.uk> | 2020-06-11 22:34:41 +0200 |
commit | 1ee8ecd8ea06cf79b9c4da9b76fd55a86ee5fcf2 (patch) | |
tree | 90f7874665a2611c16c01035041dc3cf8dd24a7c /Completion/Zsh/Type | |
parent | cce88bdb0c13e7533f85e4fc9e9c2530994eb0f0 (diff) | |
download | zsh-1ee8ecd8ea06cf79b9c4da9b76fd55a86ee5fcf2.tar.gz zsh-1ee8ecd8ea06cf79b9c4da9b76fd55a86ee5fcf2.tar.xz zsh-1ee8ecd8ea06cf79b9c4da9b76fd55a86ee5fcf2.zip |
46036: fix colouring in prompt completion
Diffstat (limited to 'Completion/Zsh/Type')
-rw-r--r-- | Completion/Zsh/Type/_ps1234 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Zsh/Type/_ps1234 b/Completion/Zsh/Type/_ps1234 index cf1982219..0ea2cdda9 100644 --- a/Completion/Zsh/Type/_ps1234 +++ b/Completion/Zsh/Type/_ps1234 @@ -38,7 +38,7 @@ if compset -P '%[FK]'; then ) _description -V ansi-colors expl 'ansi color' - grp="$expl[expl[(i)-V]+1]" + grp="$expl[expl[(i)-J]+1]" print -v ccol -f "($grp)=%s=%s" ${(kv)ansi} _comp_colors+=( $ccol ) compadd "$expl[@]" $suf $pre -k ansi && ret=0 @@ -48,10 +48,10 @@ if compset -P '%[FK]'; then (( cols = $terminfo[colors] - 1 )) (( cols = cols > 255 ? 255 : cols )) _description -V terminal-colors expl 'terminal color' - grp="$expl[expl[(i)-V]+1]" + grp="$expl[expl[(i)-J]+1]" compadd "$expl[@]" $suf $pre {0..$cols} for c in {0..$cols}; do - _comp_colors+=( "($grp)=${c}=${${$(print -P "%F{$c}")#?\[}%m}" ) + _comp_colors+=( "($grp)=${c}=${${${(%):-%F{$c\}}#?\[}%m}" ) done else _message -e terminal-colors "number" |