Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Why are prompt expansions of %v sequences quoted in bindkey style?
- X-seq: zsh-users 29547
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Marlon Richert <marlon.richert@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Why are prompt expansions of %v sequences quoted in bindkey style?
- Date: Tue, 23 Jan 2024 19:55:59 +0100
- Archived-at: <https://zsh.org/users/29547>
- In-reply-to: <93F17F14-8DF3-4D02-875F-A7BAE9BA6427@gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAN=4vMoUnO=v3tWyY3+4ixMEfu_8_bC+c_KEOVCoLK7QH4Kogw@mail.gmail.com> <93F17F14-8DF3-4D02-875F-A7BAE9BA6427@gmail.com>
On Tue, Jan 23, 2024 at 7:44 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> I missed that a 2nd expansion was needed in my example, but that is easy to work around.
>
> However, the quoting seems to make it impossible to use $psvar for anything involving control characters.
This is correct and I believe intended. I appreciate this feature for
what it is and find it very useful.
> Is there no way to work around this?
These are the options if you want to use \e[2m within the prompt:
1. A static PS1 with \e[2m embedded directly in the value without indirection.
2. The same as above but the value of PS1 is set in precmd and thus
can change from command to command.
3. prompt_subst
There are no other options that I'm aware of.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author