Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] prompt: support generic non-visible regions
- X-seq: zsh-workers 50463
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx, Oliver Kiddle <opk@xxxxxxx>, dana <dana@xxxxxxx>
- Subject: Re: [PATCH] prompt: support generic non-visible regions
- Date: Thu, 11 Aug 2022 20:55:19 +0200
- Archived-at: <https://zsh.org/workers/50463>
- In-reply-to: <CAN=4vMqwjOtABPgDsXioP7NBxw=O3RRbDt7ZB7CLHtTR-omvPw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20220810115120.182853-1-felipe.contreras@gmail.com> <CAN=4vMqHNZJ7BvCCNbD7-0nPr1CbN1ecHQVxSsaZQ1Ao13__jg@mail.gmail.com> <CAN=4vMqwjOtABPgDsXioP7NBxw=O3RRbDt7ZB7CLHtTR-omvPw@mail.gmail.com>
On Thu, Aug 11, 2022 at 7:24 PM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> On Thu, Aug 11, 2022 at 4:37 PM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > I like this patch [...]
>
> I should've said that I like the idea behind it. The patch implements
> one part of it. To complete the implementation percent expansion needs
> to output \001 and \002.
I apologize for replying to my own message multiple times.
I just realized that what I suggested may not work. Consider this code:
print -r -- ${(%):-'%{hello%}'}
Currently it is equivalent to this:
print -r -- 'hello'
However, if percent expansion starts inserting \001 and \002, the same
code will be equivalent to this:
print -r -- $'\001hello\002'
This may be undesirable.
The patch by Felipe, as it stands, doesn't have this problem.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author