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

Re: Turning display attributes on / off in prompt strings



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