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

Re: PATCH: broader support for highlight groups



On Fri, Mar 1, 2024 at 5:21 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> 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}.

This would somewhat be in line with the hash tables built by the
"colors" function ... which is both a plus and a minus, because I'm
already tired of explaining that prompts et al. do not use $color
internally.

> 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?

If you choose to disable bleed-over, please have a look at the way
Functions/Misc/sticky-note applies its background coloring and adjust
if necessary?  I've never really spent any time understanding
zle_highlight, and although "vared" has options to set the prompts any
highlighting would (I think?) have to be done in the line-init and
line-finish widgets if the prompts can't bleed?




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