Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Feature request: italic style in region_highlight
- X-seq: zsh-workers 45176
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: Feature request: italic style in region_highlight
- Date: Tue, 31 Dec 2019 16:07:05 -0800
- Cc: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- In-reply-to: <CAN=4vMrtbUFpyLLdvKZtGLMss4RT5qKUBU6EoPr3y-3JotEy5w@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>
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.
> 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.
I think %R and %r have been preempted for the spell correction prompt
(see SPROMPT in the manual, could probably stand to have a mention
added in the section with the rest of the prompt expansions).
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author