zsh-workers
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Marlon Richert <marlon.richert@gmail.com>
Cc: Daniel Shahaf <d.s@daniel.shahaf.name>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: region_highlight converts `fg=default` to `none`, which is not the same
Date: Thu, 15 Oct 2020 19:09:10 +0200	[thread overview]
Message-ID: <CAN=4vMrhFNOF7-Zk5njFq=5guk=wTx27XBkc7BSnY4Aw23bWyQ@mail.gmail.com> (raw)
In-Reply-To: <0B36073E-6BF5-4C42-B591-1573FEC2AFA8@gmail.com>

On Thu, Oct 15, 2020 at 6:58 PM Marlon Richert <marlon.richert@gmail.com> wrote:
>
>
> > On 15. Oct 2020, at 10.37, Roman Perepelitsa <roman.perepelitsa@gmail.com> wrote:
> >
> > Going forward, we can extend the spec syntax to give users more
> > flexibility. I can see two extensions.
> >
> > 1. In addition to "underline", one can use "underline=on" and "underline=off".
> > 2. If the first character of the spec is "+", it's merged with the
> > current spec for the region; if the character is "=", it overrides;
> > otherwise the current behavior is preserved (specs with fg and bg
> > override, other specs merge).
> >
> > Thoughts?
>
> If you’re going to extend the spec syntax, could you consider adding more ANSI attributes, such as `faint` and `conceal`?

It's premature to say I'm going to extend the spec syntax. Just
thinking out loud, looking for feedback.

That said, extra ANSI attributes would be useful. My first choice
would be italic. The biggest problem with adding it is that zattr
doesn't have free bits left, so adding just one extra one/off
attribute would require changing the type of zattr from uint64_t to
some kind of struct, which would in turn require sweeping code changed
because zattr is used in so many places as an argument to bitwise
operators. I've spent a full day on this a few months back and
eventually stashed the change.

Another obstacle to supporting more ANSI attributes is the shortage of
upper- and lowercase letters that can be used in prompt expansions
(similar to %B/%b and %U/%u for bold and underlined). It would be a
shame if it was possible to use italic/faint/conceal in
region_highlight but not in prompt.

Note that the spec extension I proposed (or rather mused about) above
isn't affected by these challenges.

Roman.


  reply	other threads:[~2020-10-15 17:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12  9:22 Marlon Richert
2020-10-13 11:05 ` Roman Perepelitsa
2020-10-14  5:12   ` Marlon Richert
2020-10-14 20:46   ` Daniel Shahaf
2020-10-15  7:37     ` Roman Perepelitsa
2020-10-15 16:58       ` Marlon Richert
2020-10-15 17:09         ` Roman Perepelitsa [this message]
2020-10-16 13:36           ` Daniel Shahaf
2020-10-24  1:34           ` Oliver Kiddle
2020-10-24  6:42             ` Roman Perepelitsa
2020-10-16 13:28       ` Daniel Shahaf
2020-10-16 15:50         ` Bart Schaefer
2020-10-22 19:58           ` Marlon Richert
2020-10-22 23:28             ` Daniel Shahaf
2020-10-23  8:08             ` Roman Perepelitsa
2020-10-23  9:24               ` Marlon Richert
2020-10-23  9:35                 ` Roman Perepelitsa
2020-10-23 10:40                   ` Marlon Richert
2020-10-23 11:38                     ` Roman Perepelitsa
2020-10-24  0:50                       ` Functions/Misc/colors vs. region_highlight Bart Schaefer
2020-11-03 18:54                         ` Marlon Richert
2020-11-03 23:45                           ` Bart Schaefer
2020-11-04 15:47                             ` Marlon Richert
2021-04-18 21:40                         ` Bart Schaefer
2020-10-23 23:57                   ` Threading across year boundaries (was: Re: region_highlight converts `fg=default` to `none`, which is not the same) Daniel Shahaf
2021-03-31  8:26       ` region_highlight converts `fg=default` to `none`, which is not the same Marlon Richert
2021-04-10 20:33         ` Lawrence Velázquez
2021-04-13 15:20           ` Daniel Shahaf
2021-04-13 20:33             ` Roman Perepelitsa
2021-04-14 11:04               ` Daniel Shahaf
2021-05-09 20:49                 ` Lawrence Velázquez
2021-05-31  1:16                   ` Lawrence Velázquez
2021-03-31  8:24   ` Marlon Richert

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='CAN=4vMrhFNOF7-Zk5njFq=5guk=wTx27XBkc7BSnY4Aw23bWyQ@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=marlon.richert@gmail.com \
    --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).