Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH v2] prompt: support generic non-visible regions
- X-seq: zsh-workers 50476
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH v2] prompt: support generic non-visible regions
- Date: Sun, 14 Aug 2022 18:00:34 -0700
- Archived-at: <https://zsh.org/workers/50476>
- In-reply-to: <CAMP44s36=YoiT7Lt-_j6h-fc47z_RS2CexCR++PCZ7p1CXxfEA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20220811230901.471640-1-felipe.contreras@gmail.com> <CAH+w=7b2pn6=eXHxRRB8GR-yi6iH+fL8t0SO7Kka415O4g5wxQ@mail.gmail.com> <CAMP44s36=YoiT7Lt-_j6h-fc47z_RS2CexCR++PCZ7p1CXxfEA@mail.gmail.com>
On Sun, Aug 14, 2022 at 3:47 PM Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
>
> > How does one embed a literal ctrl-A or ctrl-B in the prompt?
>
> What would that achieve?
Nothing specific, but one can embed any other literal character, so
why not those?
> > I haven't found any readline documentation that explains the use of
> > "start of header" or "start of text".
>
> It's in the code:
Ah, so "start of header/text" is your phrasing, not theirs.
> > I'm also leaning to the opinion that \001 and \002 should only be
> > recognized when PROMPT_PERCENT is unset.
>
> That would defeat the primary purpose of the patch, which is to be
> able to write prompt helper functions which work in multiple shells.
In that case I think the patch is incomplete, because it's not keeping
track of bv->dontcount and will be confused if both \001 and %} are
used (or %{ and \002). See lines 602 through 628 of Src/prompt.c
(line numbers as of commit c5a891a2).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author