zsh-workers
 help / color / mirror / code / Atom feed
* Feature request: italic style in region_highlight
@ 2019-12-30  1:29 Sebastian Gniazdowski
  2019-12-30 10:16 ` Roman Perepelitsa
  0 siblings, 1 reply; 16+ messages in thread
From: Sebastian Gniazdowski @ 2019-12-30  1:29 UTC (permalink / raw)
  To: Zsh hackers list

Hi,
it would be nice if the italic escape (\e[3m) would have been
supported in the region_highlight array. Currently supported are only
bold, standout and underline. The escape is widely supported, e.g.: it
works on urxvt out of the box.
-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2019-12-30  1:29 Feature request: italic style in region_highlight Sebastian Gniazdowski
@ 2019-12-30 10:16 ` Roman Perepelitsa
  2019-12-30 16:07   ` Bart Schaefer
  0 siblings, 1 reply; 16+ messages in thread
From: Roman Perepelitsa @ 2019-12-30 10:16 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: Zsh hackers list

On Mon, Dec 30, 2019 at 2:30 AM Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
>
> Hi,
> it would be nice if the italic escape (\e[3m) would have been
> supported in the region_highlight array. Currently supported are only
> bold, standout and underline. The escape is widely supported, e.g.: it
> works on urxvt out of the box.

Zsh sort of supports italicized text through "standout" attribute in
ncurses. ncurses translates standout to italicized on some terminals
and to negative image on others.

    % zle_highlight=(default:standout)
    % export TERM=screen-256color
    % print -P '%Shello%s'
    hello
    % export TERM=xterm-256color
    % print -P '%Shello%s'
    hello

With TERM=screen-256color standout is italicized while with
TERM=xterm-256color it's negative image.

The terms "italicized" and "negative image" come from ECMA-48. Note
that it doesn't define "standout".

When printing text, you can use `colors` from contrib to bypass
ncurses. Confusingly enough, in `color` associative array the key for
italicized text is "standout" (negative image goes by "reverse").

    % autoload -Uz colors
    % colors
    % echo "\e[$color[standout]mhello$reset_color"

The only difference between $color[standout] and plain `3` is
readability. I know which version I prefer.

As far as I can tell, there is no way to specify italicized attribute
through zle_highlight or region_highlight. zle_highlight allows you to
override the default escape sequences used by fg and bg attributes. It
seems natural to extend this API to also allow overriding escape
sequences used by standout style. Then you would be able to do this:

    zle_highlight=(default:standout standout_begin_code:'\e[3m'
standout_stop_code:'\e[23m')

fg_start_code and fg_end_code specify the prefix and the suffix of a
single escape sequence. To avoid confusion, I've used begin/stop with
standout. It's awkward, as the natural pairing would be start/stop and
begin/end. Oh well.

Roman.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2019-12-30 10:16 ` Roman Perepelitsa
@ 2019-12-30 16:07   ` Bart Schaefer
  2019-12-30 16:26     ` Roman Perepelitsa
  0 siblings, 1 reply; 16+ messages in thread
From: Bart Schaefer @ 2019-12-30 16:07 UTC (permalink / raw)
  To: Roman Perepelitsa; +Cc: Sebastian Gniazdowski, Zsh hackers list

On Mon, Dec 30, 2019 at 2:17 AM Roman Perepelitsa
<roman.perepelitsa@gmail.com> wrote:
>
> Zsh sort of supports italicized text through "standout" attribute in
> ncurses. ncurses translates standout to italicized on some terminals
> and to negative image on others.

The way the "colors" function/array have dealt with similar issues is
to declare e.g color[grey]=${color[black]} ... however, the difference
between negative image and italic may be too drastic to alias that to
standout.

> When printing text, you can use `colors` from contrib to bypass
> ncurses. Confusingly enough, in `color` associative array the key for
> italicized text is "standout" (negative image goes by "reverse").

I believe the use of "standout" there comes from the xterm
documentation (circa the time the colors function was contributed, it
may have since been updated).

>     zle_highlight=(default:standout standout_begin_code:'\e[3m'
> standout_stop_code:'\e[23m')
>
> fg_start_code and fg_end_code specify the prefix and the suffix of a
> single escape sequence. To avoid confusion, I've used begin/stop with
> standout. It's awkward, as the natural pairing would be start/stop and
> begin/end. Oh well.

Could use standout_enter/exit (or enter/end).

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2019-12-30 16:07   ` Bart Schaefer
@ 2019-12-30 16:26     ` Roman Perepelitsa
  2020-01-01  0:07       ` Bart Schaefer
  0 siblings, 1 reply; 16+ messages in thread
From: Roman Perepelitsa @ 2019-12-30 16:26 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Sebastian Gniazdowski, Zsh hackers list

On Mon, Dec 30, 2019 at 5:08 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Mon, Dec 30, 2019 at 2:17 AM Roman Perepelitsa
> <roman.perepelitsa@gmail.com> wrote:
> > fg_start_code and fg_end_code specify the prefix and the suffix of a
> > single escape sequence. To avoid confusion, I've used begin/stop with
> > standout. It's awkward, as the natural pairing would be start/stop and
> > begin/end. Oh well.
>
> Could use standout_enter/exit (or enter/end).

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.

Shall I send a patch? I'd love to have this feature.

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.

Roman.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2019-12-30 16:26     ` Roman Perepelitsa
@ 2020-01-01  0:07       ` Bart Schaefer
  2020-01-02 19:18         ` Oliver Kiddle
  0 siblings, 1 reply; 16+ messages in thread
From: Bart Schaefer @ 2020-01-01  0:07 UTC (permalink / raw)
  To: Roman Perepelitsa; +Cc: Sebastian Gniazdowski, Zsh hackers list

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.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2020-01-01  0:07       ` Bart Schaefer
@ 2020-01-02 19:18         ` Oliver Kiddle
  2020-01-02 19:45           ` Roman Perepelitsa
  0 siblings, 1 reply; 16+ messages in thread
From: Oliver Kiddle @ 2020-01-02 19:18 UTC (permalink / raw)
  To: Roman Perepelitsa, Zsh hackers list

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2020-01-02 19:18         ` Oliver Kiddle
@ 2020-01-02 19:45           ` Roman Perepelitsa
  2020-01-03  2:30             ` Bart Schaefer
  0 siblings, 1 reply; 16+ messages in thread
From: Roman Perepelitsa @ 2020-01-02 19:45 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: Zsh hackers list

On Thu, Jan 2, 2020 at 8:18 PM Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
>
> That sounds useful, expecially italic.

Yesterday I started adding italic support throughout. Once it's there,
there would be no need for custom standout_on_code/standout_off_code
overrides. Plain "italic" style would surely be nicer.

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

Yep, I've already discovered this. If this was C++, I would just make
zattr std::bitset<84> and be done with it. Once could wish. Instead,
I've made zattr a struct with 3 fields: attr for on/off attributes and
fg and bg for colors. Each of these 3 fields is 4 bytes (I could make
attr 2 bytes but it won't save anything due to alignment
requirements). I don't want to spent much of your time on this as it's
not close to being done. Will send a patch when I get through with it.

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

> 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. And the UX complexity will stay pretty much
where it is now. %O and %o will work exactly like %U and %u and
similar sequences. Easy to understand. With %A{...} we would have to
explain how it interacts with the other sequences. E.g., does %u
cancel %A{4}?

Roman.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2020-01-02 19:45           ` Roman Perepelitsa
@ 2020-01-03  2:30             ` Bart Schaefer
  2020-01-03 20:28               ` Daniel Shahaf
  0 siblings, 1 reply; 16+ messages in thread
From: Bart Schaefer @ 2020-01-03  2:30 UTC (permalink / raw)
  To: Roman Perepelitsa; +Cc: Oliver Kiddle, Zsh hackers list

On Thu, Jan 2, 2020 at 1:06 PM Roman Perepelitsa
<roman.perepelitsa@gmail.com> 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}.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2020-01-03  2:30             ` Bart Schaefer
@ 2020-01-03 20:28               ` Daniel Shahaf
  2021-05-20 13:33                 ` Marlon Richert
  2021-05-25 17:28                 ` Bart Schaefer
  0 siblings, 2 replies; 16+ messages in thread
From: Daniel Shahaf @ 2020-01-03 20:28 UTC (permalink / raw)
  To: zsh-workers

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@gmail.com> 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2020-01-03 20:28               ` Daniel Shahaf
@ 2021-05-20 13:33                 ` Marlon Richert
  2021-05-25 16:38                   ` Oliver Kiddle
  2021-05-25 17:28                 ` Bart Schaefer
  1 sibling, 1 reply; 16+ messages in thread
From: Marlon Richert @ 2021-05-20 13:33 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: Zsh hackers list

Did this discussion and the one in workers/47491 ever result in
anything? Is it still on the table?

On Fri, Jan 3, 2020 at 10:28 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>
> 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@gmail.com> 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.)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2021-05-20 13:33                 ` Marlon Richert
@ 2021-05-25 16:38                   ` Oliver Kiddle
  2021-05-25 20:50                     ` Marlon Richert
  0 siblings, 1 reply; 16+ messages in thread
From: Oliver Kiddle @ 2021-05-25 16:38 UTC (permalink / raw)
  To: Marlon Richert; +Cc: Zsh hackers list

On 20 May, Marlon Richert wrote:
> Did this discussion and the one in workers/47491 ever result in
> anything? Is it still on the table?

I did apply patch 47510 which corresponds to possibility (1) from
workers/47491. That does free the necessary two bits for italic to be
possible. I was inclined to give that some time before reusing the
bits in case it needs to be reverted.

I still think possibility (2) from 47491 is worth pursuing, mainly
because the associated refactoring would likely simplify a good chunk
of code. There's probably demand for supporting further attributes. But
I'm not sure whether there are any I'd have much use for. Faint and
dim don't seem to be supported in any of my terminals and are possibly
often only equivalent to a different colour. <blink> in HTML was derided
for a good reason. reverse as distinct from standout should probably be
supported.

Actually adding the support for just italic should now be relatively
straightforward because it is mostly copy and paste from existing
attributes. %A{italic} rather than %O would be slightly more effort but
is, I think, nicer. If we do end up having to revert 47510, possibility
(3) is at least definitely possible as a last resort even though it'd
make the code uglier.

Oliver


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2020-01-03 20:28               ` Daniel Shahaf
  2021-05-20 13:33                 ` Marlon Richert
@ 2021-05-25 17:28                 ` Bart Schaefer
  2021-05-25 22:43                   ` Oliver Kiddle
  1 sibling, 1 reply; 16+ messages in thread
From: Bart Schaefer @ 2021-05-25 17:28 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: Zsh hackers list

Since we've reopened this thread, harkening back to an old comment of Daniel's:

On Fri, Jan 3, 2020 at 1:05 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>
> 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.

We've already found in another thread (the one about %B/%b) that
terminfo is inadequate, it doesn't define escapes for all possible
ANSI combinations.  In this specific example, %A{bold} has no terminfo
equivalent to turn (only) it off when %a is reached.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2021-05-25 16:38                   ` Oliver Kiddle
@ 2021-05-25 20:50                     ` Marlon Richert
  2021-05-25 20:56                       ` Bart Schaefer
  0 siblings, 1 reply; 16+ messages in thread
From: Marlon Richert @ 2021-05-25 20:50 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: Zsh hackers list

On Tue, May 25, 2021 at 7:39 PM Oliver Kiddle <opk@zsh.org> wrote:
> reverse as distinct from standout should probably be supported.

I personally feel like standout is mostly useless, as you never know
how it's going to be rendered. I would prefer dropping standout
altogether and replacing it with separate italic and reverse.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2021-05-25 20:50                     ` Marlon Richert
@ 2021-05-25 20:56                       ` Bart Schaefer
  2021-05-27  8:04                         ` Marlon Richert
  0 siblings, 1 reply; 16+ messages in thread
From: Bart Schaefer @ 2021-05-25 20:56 UTC (permalink / raw)
  To: Marlon Richert; +Cc: Oliver Kiddle, Zsh hackers list

On Tue, May 25, 2021 at 1:51 PM Marlon Richert <marlon.richert@gmail.com> wrote:
>
> I personally feel like standout is mostly useless, as you never know
> how it's going to be rendered. I would prefer dropping standout
> altogether and replacing it with separate italic and reverse.

This is back to "tput or not tput, that is the question" because
"standout" is a terminfo-defined rendering, whereas "italic" is not.

I think we're unlikely to drop standout even if we add others, because
%S/%s have been around for too long.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2021-05-25 17:28                 ` Bart Schaefer
@ 2021-05-25 22:43                   ` Oliver Kiddle
  0 siblings, 0 replies; 16+ messages in thread
From: Oliver Kiddle @ 2021-05-25 22:43 UTC (permalink / raw)
  To: Zsh hackers list

Bart Schaefer wrote:
> On Fri, Jan 3, 2020 at 1:05 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> >
> > 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.
> We've already found in another thread (the one about %B/%b) that
> terminfo is inadequate, it doesn't define escapes for all possible
> ANSI combinations.  In this specific example, %A{bold} has no terminfo
> equivalent to turn (only) it off when %a is reached.

Inadequacies of terminfo is even more reason to only expose symbolic
names to users/script writers.

We're tracking the state of all attributes and something like

  print -P '%B%U hello %b bye %u'

Turns off all attributes and then turns underline back on when it
reaches the %b.

Whether we want to hardcode a raw escape (such as for turning off bold)
comes down to how portable it is and whether it brings us any actual
benefit.

There are times where the remembering of attribute state is actually a
nuisance. In my own .zshrc, in a loop where I build up associative
arrays to represent attributes/colours in different formats, I need the
following to reset it:

  : ${(%):-%u%b%k%f}

What isn't so clear is how the %A{ interface should handle turning
attributes off, either:

   %A{italic} ... %a{italic}  is needed
   %A{italic} ... %a          where we remember what the last %A was
   %A{italic} ... %a          where %a turns off all attributes
   %A{italic} ... %A{-italic}

Those options aren't all necessarily exclusive.
Also, what about allowing %A{bold,italic} or even %A{fg=208} ?

Oliver


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Feature request: italic style in region_highlight
  2021-05-25 20:56                       ` Bart Schaefer
@ 2021-05-27  8:04                         ` Marlon Richert
  0 siblings, 0 replies; 16+ messages in thread
From: Marlon Richert @ 2021-05-27  8:04 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Oliver Kiddle, Zsh hackers list

On Tue, May 25, 2021 at 11:56 PM Bart Schaefer
<schaefer@brasslantern.com> wrote:
>
> On Tue, May 25, 2021 at 1:51 PM Marlon Richert <marlon.richert@gmail.com> wrote:
> >
> > I personally feel like standout is mostly useless, as you never know
> > how it's going to be rendered. I would prefer dropping standout
> > altogether and replacing it with separate italic and reverse.
>
> This is back to "tput or not tput, that is the question" because
> "standout" is a terminfo-defined rendering, whereas "italic" is not.

"Italic on" is called 'sitm' in terminfo and 'ZH' in termcap. "Italic
off" is called 'ritm' in terminfo and 'ZR' in termcap. `tput sitm`
works fine in terminals that have it in their terminfo entry.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-05-27  8:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-30  1:29 Feature request: italic style in region_highlight 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
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

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