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 51231
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Turning display attributes on / off in prompt strings
- Date: Fri, 16 Dec 2022 23:50:03 -0800
- Archived-at: <https://zsh.org/workers/51231>
- In-reply-to: <37998-1671237833.378022@KQt2.DuNm.SJtt>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Yt757b8erwTo5Y1+1fBSQbShV6XCaM8q6wnkGZHmQqeA@mail.gmail.com> <37998-1671237833.378022@KQt2.DuNm.SJtt>
On Fri, Dec 16, 2022 at 4:45 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> Bart Schaefer wrote:
> > you can't mix in "raw" sequences for attributes that prompt.c
> > doesn't "know about"
>
> It can also get confused when you assign the results of ${(%)...} to a
> variable without printing the results.
A consideration is that if we simply replaced $"\e[m' with $'\e[24m'
and so on, the present prompt code would still emit the
then-unnecessary sequences to restore the other attributes. Is it
worth the effort to rework that?
> I'd be reluctant to create an extra setopt without first having evidence
> that terminals that need it are still in use.
Agreed, I was excerpting Mikael mostly for "would [not] lose a lot of
compatibility".
> And if we need a way to
> override terminal settings, something more generic may be better.
Would populating a writable special hash parameter be a security issue?
As you implied, though, the hash key names could be tricky to choose.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author