Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: fix for colouring in completion of prompt colours



Some terminals' termcap definitions use colons instead of semi-colons as
the separator in SGR sequences. I've been using such a terminal (namely
foot) where I have a wayland session and this is not the first fix I've
needed to make because of it. The application of the actual colours to
the numbers in the complist completion needs to strip back the literal
escape to the SGR number list because complist does LS_COLORS style
formatting. And that uses colons as its own separator.

Oliver

diff --git a/Completion/Zsh/Type/_ps1234 b/Completion/Zsh/Type/_ps1234
index e4391dc00..b9031cf29 100644
--- a/Completion/Zsh/Type/_ps1234
+++ b/Completion/Zsh/Type/_ps1234
@@ -52,7 +52,7 @@ if compset -P '%[FK]'; then
     grp="$expl[expl[(i)-J]+1]"
     compadd "$expl[@]" "$suf[@]" $pre {0..$cols}
     for c in {0..$cols}; do
-      _comp_colors+=( "($grp)=${c}=${${${(%):-%F{$c\}}#?\[}%m}" )
+      _comp_colors+=( "($grp)=${c}=${${${${(%):-%F{$c\}}#?\[}%m}//:/;}" )
     done
   else
     _message -e terminal-colors "number"




Messages sorted by: Reverse Date, Date, Thread, Author