Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: broader support for highlight groups
- X-seq: zsh-workers 52649
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: broader support for highlight groups
- Date: Sat, 2 Mar 2024 08:57:53 +0100
- Archived-at: <https://zsh.org/workers/52649>
- In-reply-to: <90949-1709342493.093890@W3fn.AXo8.ESGa>
- List-id: <zsh-workers.zsh.org>
- References: <90949-1709342493.093890@W3fn.AXo8.ESGa>
On 3/2/24, Oliver Kiddle <opk@xxxxxxx> wrote:
> This broadens the support for %H to completion explanation strings
> (with and without complist) and WATCHFMT, both of which already support
> %B/%S/%U/%F/%K. This also affects the list-prompt style as a
> side-effect.
>
> Completion for prompt strings also gains support for %H.
>
> The return value from parsehighlight() has been changed to go one
> past the end character because that's now convenient for more of the
> callers than leaving it on the end character. The one change of int to
> size_t in watch.c is to silence a (-Wextra) compiler warning.
>
> We still lack a way to reset attributes. Rather than %r, which does
> have tenuous conflicts with completion explanations and some obscure
> uses of zformat, I'm tending towards special-casing %H{reset} and/or
> %H{none}. And perhaps disabling the feature of allowing left-over
> attributes in the prompt to bleed over into the user's input where those
> attributes came from a highlight group. That feature only exists for
> backward-compatibility and anyone using a new feature like highlight
> groups can also set the default key in zle_highlight. Any opinions?
What about just %H without any arguments to reset?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author