Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Turning display attributes on / off in prompt strings
- X-seq: zsh-workers 51245
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Turning display attributes on / off in prompt strings
- Date: Wed, 21 Dec 2022 18:12:38 +0100
- Archived-at: <https://zsh.org/workers/51245>
- In-reply-to: <CAH+w=7Yt757b8erwTo5Y1+1fBSQbShV6XCaM8q6wnkGZHmQqeA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Yt757b8erwTo5Y1+1fBSQbShV6XCaM8q6wnkGZHmQqeA@mail.gmail.com>
On 16 Dec, you wrote:
> So ... I've been playing with this, and on my "xterm-color" terminal
> se and ue are both $'\e[m' -- and yet "print -P" and ${(%)...} and so
> on do "the right thing" and output extra control sequences depending
> on what other attributes are active. For example
Just noticing these details again, it would seem that zle is currently
broken for your case:
% TERM=xterm-color zsh -df
% zle-line-init() {
region_highlight=( 'P 1 2 underline' 'P 1 4 standout' )
LBUFFER=1234567890
}
% zle -N zle-line-init
Only the 2 is in standout.
Are you sure xterm-color is the right $TERM value to use? Are you
getting that by default or have you set it? Just running xterm gives me
a TERM value of xterm. Setting it to xterm-256color would also work. I
use rxvt-unicode which has display glitches in compinit menus that I
think are zsh issues.
So perhaps we do need to invalidate attributes after turning off
standout and underline if we stick to termcap. I'm still sceptical about
our prompt code doing it for turning bold on.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author