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)
- X-seq: zsh-workers 43884
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- Subject: Re: highlight test cases (was Re: [BUG?] If true-color is used, overlapping colors do not work)
- Date: Mon, 10 Dec 2018 03:54:27 +0100
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1544410470; bh=S6eKZU2ISnjLSFOYyW6gAJu19oFKZ8VPizW38+yVBJk=; h=From:References:To:Subject:Date:From:Subject; b=EsqN0szXrKrtUd6Aj3LcelBxR9qTvblaMj73JP/ul7US/xbvwXIj0hd+7FOUTlSlCcLnscfNtj1HboG+e/N28JpzmVJW8qebyBuZ8hg8Ie/YESrltBU4wA/PeVQwdeHF3rR6kg7Qy5ZNTRA/fbJKZdOoq9ozi7BM1Kmk6t52JhMuAMdBUD3nGjTSbvnshzq0jBhLnJwGwTf2NCFXFQIoxetNDTCAkkliKUBRcbxasgyPvrD70kP+e2ozINdvr1l2fJyyiA7Q/yA5t4srrhg9b7hnJOJo9qB0FxFy1uyVv/iNL8Rh6Gu0ZBdeXWKA4xtV9ytTLs2Jc3GgSVcxAvqkVA==
- In-reply-to: <CAKc7PVDF1=izGKVqGUB++bpvse4fzg+xJ93K-0_ayzYW2cVZXQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDgEtfLAibbxRr36=UgPoPk8grvsH5G2+AOipr_vmt-cQ@mail.gmail.com> <2362-1541646201.813952@nGIL.zWP_.YhaK> <CAKc7PVAPxxtSaV5qMWzaueW+9_ZHXrHYX2032cHYYDq3Gh399w@mail.gmail.com> <20626-1541726901.821000@xGvJ.shtD.SkCN> <CAKc7PVBpL_HwKUHLD5mQCLmWszfnrbJ2ARyrkzVKsi6yStWeNA@mail.gmail.com> <31159-1543080743.164776@h8df.-SiL.hblq> <CAKc7PVDF1=izGKVqGUB++bpvse4fzg+xJ93K-0_ayzYW2cVZXQ@mail.gmail.com>
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