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

Re: %F doesn't work in format style



On Thu, 15 May 2008 21:29:25 +0200
"Mikael Magnusson" <mikachu@xxxxxxxxx> wrote:
> zstyle ':completion:*:corrections' format '%B---- %d (errors: %e)%b'
> works fine
> zstyle ':completion:*:corrections' format '%F{red}---- %f%d (errors: %e)%b'
> produces
> {red}---- corrections (errors: 2)
> (unformatted)
> 
> The manpage claims
>   This  string  may  also  contain  the  sequences
>   to specify output attributes, such as `%B', `%S' and `%{...%}'
> 
> Is %F such as %B? :) It's listed in the same section anyway.

This is all handled completely separately in zle_tricky.c for standard
completion formatting and yet again in complist.c when zsh/complist is
loaded.  Sven never reused code if there was any hope of creating
something at least marginally incompatible in another file.  Colours
should definitely be added to completion.  Ideally, in fact,
highlighting should be subtracted and done via the code I've moved into
the main shell, but as completion formatting doesn't handle full prompt
escapes that's not so easy.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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