Zsh Mailing List Archive
Messages sorted by:
Re: region_highlight converts `fg=default` to `none`, which is not the same
- X-seq: zsh-workers 47464
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Marlon Richert <marlon.richert@xxxxxxxxx>
- Subject: Re: region_highlight converts `fg=default` to `none`, which is not the same
- Date: Thu, 15 Oct 2020 19:09:10 +0200
- Archived-at: <https://zsh.org/workers/47464>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-10/CAN%3D4vMrhFNOF7-Zk5njFq%3D5guk%3DwTx27XBkc7BSnY4Aw23bWyQ%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-il1-f175.google.com) smtp.remote-ip=126.96.36.199; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Cc: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=YruuUqR7BWGDJwwPYXt42RpKFDMax1TK86GoPJ12PWg=; b=hX24YtacqRvCd2UZTcSsvoNFiThZv6Z4uzBkLisY4HA5f3Uw9kst3h5f+oIK0SJ1Og uLGdMzEQuC9QhOK/DNok9pvKpV8iaoqJSw4kiZI+73o53fw/aUxmYu5fYyodhBjoLAgc 7O0q6VMtzVyXAuGW0PpypSGdfKTuZvqx4GmNJGaleU8vWgYKsfianAg5iSiSLbVqFb2m eIoV9TWf+n24JU7Kn7CqmDhIbPhBm/x8lVpZagm2OrxfQDSUrkVmlpUmJcvQ0LU7J8bh iCpA+ZPGYMnI3+MH/d+8fs+xSuFNoGRVgQzbb5JO0hOd4BqTLNwKpsURdnJ9xkJ4aHZv ekkA==
- In-reply-to: <0B36073E-6BF5-4C42-B591-1573FEC2AFA8@gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:email@example.com?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:firstname.lastname@example.org>
- List-post: <mailto:email@example.com>
- List-subscribe: <mailto:firstname.lastname@example.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:email@example.com?subject=unsubscribe%20zsh-workers>
- References: <CAN=4vMqencidrpknTheyjAYQRT9BHN8ZLXRFk2Z38Gfwx9mxyQ@mail.gmail.com> <0B36073E-6BF5-4C42-B591-1573FEC2AFA8@gmail.com>
- Sender: zsh-workers-request@xxxxxxx
On Thu, Oct 15, 2020 at 6:58 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
> > On 15. Oct 2020, at 10.37, Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> 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.
Messages sorted by: