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

Re: Feature request: italic style in region_highlight



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