Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Feature request: italic style in region_highlight
- X-seq: zsh-workers 45158
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: Feature request: italic style in region_highlight
- Date: Mon, 30 Dec 2019 08:07:53 -0800
- Cc: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- In-reply-to: <CAN=4vMpBOD5XJOgjiOWYUJV4QaV2Fn9+PkgTCTMtArJ4GxJA8w@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>
On Mon, Dec 30, 2019 at 2:17 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> 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).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author