From: Bart Schaefer <schaefer@brasslantern.com>
To: Oliver Kiddle <opk@zsh.org>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: Turning display attributes on / off in prompt strings
Date: Wed, 21 Dec 2022 13:03:36 -0800 [thread overview]
Message-ID: <CAH+w=7bmvz6jA0AA2raRvNqOtvxvDQG_U=OYrMUYz31ft0zEFg@mail.gmail.com> (raw)
In-Reply-To: <35039-1671642758.687922@w9LM._aQT.AVUt>
On Wed, Dec 21, 2022 at 9:12 AM Oliver Kiddle <opk@zsh.org> 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.
prev parent reply other threads:[~2022-12-21 21:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 19:45 Bart Schaefer
2022-12-17 0:43 ` Oliver Kiddle
2022-12-17 7:50 ` Bart Schaefer
2022-12-17 9:47 ` Oliver Kiddle
2022-12-17 19:45 ` Bart Schaefer
2022-12-21 16:46 ` Oliver Kiddle
2022-12-21 21:28 ` Bart Schaefer
2022-12-21 17:12 ` Oliver Kiddle
2022-12-21 21:03 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7bmvz6jA0AA2raRvNqOtvxvDQG_U=OYrMUYz31ft0zEFg@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=opk@zsh.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).