Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Feature request: italic style in region_highlight



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.  There's definitely no
'a' in putpromptchar.  So we still have %A/%a if we think of something
else they're needed for.)

>
> > I like the idea of %A{...} but would favour symbolic names over numbers
>
> Another benefit of symbolic names is that zsh will know how to flip
> the attribute on and off.

I think Oliver meant symbolic names inside the braces, like
%A{oblique}, but no matter.

> 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}.



Messages sorted by: Reverse Date, Date, Thread, Author