zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Feature request: italic style in region_highlight
Date: Thu, 02 Jan 2020 20:18:52 +0100	[thread overview]
Message-ID: <40813-1577992732.270919@2Jfy.SNk-.4lUU> (raw)
In-Reply-To: <CAH+w=7a452bDNEywy_btmB0B=2YrMKvQqmYMyzNnbTMZi2p9AQ@mail.gmail.com>

Bart wrote:
> On Mon, Dec 30, 2019 at 8:27 AM Roman Perepelitsa
> <roman.perepelitsa@gmail.com> 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

  reply	other threads:[~2020-01-02 21:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30  1:29 Sebastian Gniazdowski
2019-12-30 10:16 ` Roman Perepelitsa
2019-12-30 16:07   ` Bart Schaefer
2019-12-30 16:26     ` Roman Perepelitsa
2020-01-01  0:07       ` Bart Schaefer
2020-01-02 19:18         ` Oliver Kiddle [this message]
2020-01-02 19:45           ` Roman Perepelitsa
2020-01-03  2:30             ` Bart Schaefer
2020-01-03 20:28               ` Daniel Shahaf
2021-05-20 13:33                 ` Marlon Richert
2021-05-25 16:38                   ` Oliver Kiddle
2021-05-25 20:50                     ` Marlon Richert
2021-05-25 20:56                       ` Bart Schaefer
2021-05-27  8:04                         ` Marlon Richert
2021-05-25 17:28                 ` Bart Schaefer
2021-05-25 22:43                   ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40813-1577992732.270919@2Jfy.SNk-.4lUU \
    --to=okiddle@yahoo.co.uk \
    --cc=roman.perepelitsa@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).