Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH v3 try2] prompt: support generic non-visible regions
- X-seq: zsh-workers 51494
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: [PATCH v3 try2] prompt: support generic non-visible regions
- Date: Tue, 28 Feb 2023 17:29:45 +0100
- Archived-at: <https://zsh.org/workers/51494>
- In-reply-to: <20230228155525.4186428-1-felipe.contreras@gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20230228155525.4186428-1-felipe.contreras@gmail.com>
Felipe Contreras wrote:
> readline uses \001 (start of header) and \002 (start of text) as markers
So the literal ASCII Ctrl-A and Ctrl-B characters and not the \001 etc
strings, right?
The main concern I have with this is whether there definitely is no use
of those two characters anywhere by any terminal for some other purpose
such that some user somewhere has them already in their prompt? And do
we know they won't form part of some other future terminal sequence? We
can find a special way to generate the literal characters but that only
helps with future uses, not backward compatibility.
I can understand the motivation to be able to support the lack of
prompt_percent and perhaps both bash and zsh in some plugin or other.
That aside, it is somewhat frustrating that zsh doesn't have full
control of terminal attributes in the prompt and I would advise anyone
to use prompt_percent. And in a plugin to add bash and zsh special case
code, even if this is added. Do we really want to encourage the use of
literal escapes?
> + } else if(*bv->fm == 0x01) { // start non-visible characters
For now, we've not, to my knowledge, bumped our requirements to cover
C99, C17 etc so stick with old-style C comments in the code.*
Oliver
*Except I notice exceptions have crept into Src/Modules/curses.c
If we want to consider this, it should be a separate discussion.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author