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

Re: highlight test cases (was Re: [BUG?] If true-color is used, overlapping colors do not work)



On 30 Nov, Sebastian Gniazdowski wrote:
> The output doesn't follow zsh_highlight replacements for start-code
> and end-code and still emits raw codes.
>
> Could this be fixed?

That was intentional. As I stated in 43759 which was the message
including the true color patch:

| The actual escape sequences appear to be quite standard and are, for
| now, hard coded. We should probably support some zle_highlight fields
| similar to fg_start_code to allow them to be configured but I'm unsure
| of what exact form that should take.

It may not be good enough to overload "fg_start_code" because the escape
sequences might vary for 16, 256 or true colours. Quite why termcap
isn't used for the first 16 colours, I couldn't say but I'd have thought
it is always better to be using termcap if possible - contrary to your
change in 43875.

Apart from that concern about overloading the existing fields, I don't
object to using zle_highlight as an override or fallback for termcap
if that's somehow useful. In the case of true colour, start and end
code may not be enough to encapsulate all the relevant details. The
sequence I used has decimal numbers separated by semi-colons but judging
from https://iterm2.com/documentation-escape-codes.html there's a
macOS terminal emulator that may want hex triplets. This is what I was
referring to when saying I was unsure what form the zle_highlight fields
should take. The current hard coded escape sequences work for everything
I've tried.

Oliver



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