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 51246
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Turning display attributes on / off in prompt strings
- Date: Wed, 21 Dec 2022 13:03:36 -0800
- Archived-at: <https://zsh.org/workers/51246>
- In-reply-to: <35039-1671642758.687922@w9LM._aQT.AVUt>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Yt757b8erwTo5Y1+1fBSQbShV6XCaM8q6wnkGZHmQqeA@mail.gmail.com> <35039-1671642758.687922@w9LM._aQT.AVUt>
On Wed, Dec 21, 2022 at 9:12 AM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> Are you sure xterm-color is the right $TERM value to use? Are you
> getting that by default or have you set it?
It's what gets set automatically when I ssh from MacOS Terminal.app
(xterm-256color) to Ubuntu.
> % 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.
That's correct.
> So perhaps we do need to invalidate attributes after turning off
> standout and underline if we stick to termcap.
I think the discussion started with the premise that we would only use
termcap if ANSI sequences don't work, and ANSI sequences can turn
on/off specific attributes with the exception of faint/normal/bold ...
so theoretically we could optimize out the tracking/restoration of
most attributes most of the time?
> I'm still sceptical about
> our prompt code doing it for turning bold on.
Agree.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author