zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: highlight test cases (was Re: [BUG?] If true-color is used, overlapping colors do not work)
Date: Tue, 11 Dec 2018 00:51:46 +0100	[thread overview]
Message-ID: <CAKc7PVDWrrentF2tAZLkD+6GsxyFB_5xyhm6DaX3WKtvivKLTA@mail.gmail.com> (raw)
In-Reply-To: <34192-1544410467.201850@fxvz.2eq1.BJLG>

On Mon, 10 Dec 2018 at 03:54, Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
>
> 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.

That said, not everything was hard-coded – zle_highlight was respected
by the true color patch.

> it is always better to be using termcap if possible - contrary to your
> change in 43875.

The patch could be changed to use zle_highlight only if its values
aren't the currently-well-known defaults. This way, if user will not
customize the codes that are being sent, he will choose to use
termcap, and be protected in the unknown-to-exists situation of
running Zsh on a terminal with custom 256 color codes (i.e. not
\e[38;5;N).

But when user will customize zle_highlight, then termcap will not be
used but the customization instead will be. User customizes --> he
want's thing to be used (of course, he's demand could be selective,
only for 256 colors or only for True Color, hehe).

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

The iTerm2 code is for changing the terminal's palette. With the
"untouched zle_highlight -> termcap" condition, this would be covered
anyway. If user will customize zle_highlight for e.g. tests, he will
be able to do <<TERMINAL==XYZ -> ZTST_unimplemented='terminal with
non-standard-codes'>> and simply don't bother about a specific
machine. And, in this situation, he actually may be interested to
still run the tests, even on such custom terminal, as the codes output
by Zsh will be standard anyway (and TERM will be xterm-256color
anyway).

> Oliver

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

  reply	other threads:[~2018-12-10 23:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 13:19 [BUG?] If true-color is used, overlapping colors do not work Sebastian Gniazdowski
2018-11-07 14:40 ` Sebastian Gniazdowski
2018-11-07 19:19   ` Sebastian Gniazdowski
2018-11-08  3:48     ` Oliver Kiddle
2018-11-08  9:25       ` Sebastian Gniazdowski
2018-11-08  3:03 ` Oliver Kiddle
2018-11-08  9:19   ` Sebastian Gniazdowski
2018-11-09  1:28     ` Oliver Kiddle
2018-11-09 15:39       ` Sebastian Gniazdowski
2018-11-11  0:43       ` Sebastian Gniazdowski
2018-11-11  5:11         ` Sebastian Gniazdowski
2018-11-24 17:32         ` highlight test cases (was Re: [BUG?] If true-color is used, overlapping colors do not work) Oliver Kiddle
2018-11-30  0:34           ` Sebastian Gniazdowski
2018-12-07  1:55             ` [BUG] General 256 colors bug – zle_highlight / fg_start_code, etc. is not respected (was: highlight test cases) Sebastian Gniazdowski
2018-12-07 20:26               ` Sebastian Gniazdowski
2018-12-09 19:13                 ` Daniel Shahaf
2018-12-11  8:06                   ` Sebastian Gniazdowski
2018-12-10  2:54             ` highlight test cases (was Re: [BUG?] If true-color is used, overlapping colors do not work) Oliver Kiddle
2018-12-10 23:51               ` Sebastian Gniazdowski [this message]
2018-12-10 23:54                 ` Sebastian Gniazdowski
2018-11-11  5:38       ` X04 zle highlight tests, near-color bug Sebastian Gniazdowski
2018-11-18 15:34         ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKc7PVDWrrentF2tAZLkD+6GsxyFB_5xyhm6DaX3WKtvivKLTA@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).