Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Feature request: italic style in region_highlight
- X-seq: zsh-workers 45215
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Feature request: italic style in region_highlight
- Date: Fri, 3 Jan 2020 20:28:07 +0000
- In-reply-to: <CAH+w=7YwxZtvZ5vetnvDVLMU8Q8=cg65hr37u6Cu66TiCGJcCQ@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> <40813-1577992732.270919@2Jfy.SNk-.4lUU> <CAN=4vMo__T7nLxcUzc7qvQQH9QC5UC+Ofjq7y8XEFfgEBC19DQ@mail.gmail.com> <CAH+w=7YwxZtvZ5vetnvDVLMU8Q8=cg65hr37u6Cu66TiCGJcCQ@mail.gmail.com>
Bart Schaefer wrote on Thu, Jan 02, 2020 at 18:30:17 -0800:
> On Thu, Jan 2, 2020 at 1:06 PM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > > %O/%o (for "oblique") would be available. I realise that an oblique font
> > > is not strictly the same as italic.
> >
> > Perfect timing. I wanted to ask which alternative letter to use as %a
> > is taken by something (watch, perhaps?). %O/%o sounds good.
>
> Agree. (However, the only use of %a I could find is in the zstyle
> formats for VCS, which didn't seem to conflict.
In vcs_info one can always double the percent sign if needed. Well, %a for one
is used in both patch-format and actionformats, so it's possible it'd have to be
doubled twice if someone wanted to use %a in its prompt meaning in patch-format.
> > With %A{...} we would have to
> > explain how it interacts with the other sequences. E.g., does %u
> > cancel %A{4}?
>
> I think if we created %A{4} (which BTW I would recommend requiring at
> least two digits, e.g. %A{04}) then we would have to document the
> existing escapes as being shorthands for the corresponding %A forms,
> so yes, %u would cancel %A{04}.
Why would we create either %A{4} or %A{04}? The API to script writers should
use symbolic names; the API between us and the terminal should use terminfo
rather than hardcoded escape sequences. If anything, something like «%X{foo}»
that does the equivalent of «%{`tput foo`%}» might be worthwhile? We could
still add an %Y/%y pair of escapes for italics but they'd be syntactic sugar
for %X{sitm} and %X{ritm} respectively.
(X, Y, and y are metasyntactic variables for the actual letters we'd use.)
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author