Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Feature request: italic style in region_highlight
- X-seq: zsh-workers 45198
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Feature request: italic style in region_highlight
- Date: Thu, 02 Jan 2020 20:18:52 +0100
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- In-reply-to: <CAH+w=7a452bDNEywy_btmB0B=2YrMKvQqmYMyzNnbTMZi2p9AQ@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: <CAKc7PVC5=SZfY8ExEZ9W2GWa=rYTu545hz9RrE9Uae=MadynSg@mail.gmail.com> <CAN=4vMpBOD5XJOgjiOWYUJV4QaV2Fn9+PkgTCTMtArJ4GxJA8w@mail.gmail.com> <CAH+w=7atVBgGEQ0M919mKLzqrcJBHALgLcuKFQmyRYCad00JdQ@mail.gmail.com> <CAN=4vMrtbUFpyLLdvKZtGLMss4RT5qKUBU6EoPr3y-3JotEy5w@mail.gmail.com> <CAH+w=7a452bDNEywy_btmB0B=2YrMKvQqmYMyzNnbTMZi2p9AQ@mail.gmail.com>
Bart wrote:
> On Mon, Dec 30, 2019 at 8:27 AM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > enter/exit sounds better than my suggestion. Another option: on/off. I
> > haven't thought of it earlier but now I think it pretty good.
>
> Yes, on/off would be fine.
>
> > Shall I send a patch? I'd love to have this feature.
>
> I don't see why not.
That sounds useful, expecially italic.
The lack of free bits in zattr (TXT macros) may be something of an
impediment. It isn't really important to prompts but would matter for
zle. There may be ways to recover bits, for example we have both
TXTBOLDFACE and TXTNOBOLDFACE which allows the code to distinguish the
actions but is redundant in terms of tracking attributes.
> > A related question. Would you (zsh elders) be receptive to my adding
> > percent escapes for italicized (%A and %a) and inverse video (%R and
> > %r) mode? %S and %s would stay unchanged.
%O/%o (for "oblique") would be available. I realise that an oblique font
is not strictly the same as italic.
> Perhaps the way around this is to use %A/%a for "attribute" the way
> %F/%f are use for foreground color. Thus %A{03} would be italic
> (where supported), %A{07} would be reverse, etc. Your call whether to
> define some counterpart of the ansi_colours array in prompt.c that
> supplies symbolic names; Functions/Misc/colors has the ECMA-48 table.
I like the idea of %A{...} but would favour symbolic names over numbers
even if we can't guarantee that they are always correct. If people
want full control they can dump literal escapes. The % sequences are
generally friendlier.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author