help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: zsh-workers@zsh.org, Bart Schaefer <schaefer@brasslantern.com>,
	Roman Perepelitsa <roman.perepelitsa@gmail.com>
Subject: Re: [PATCH v3 try2] prompt: support generic non-visible regions
Date: Tue, 28 Feb 2023 17:29:45 +0100	[thread overview]
Message-ID: <74532-1677601785.546332@Gkr5.eJZU.TqFp> (raw)
In-Reply-To: <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.*


*Except I notice exceptions have crept into Src/Modules/curses.c
If we want to consider this, it should be a separate discussion.

  reply	other threads:[~2023-02-28 16:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 15:55 Felipe Contreras
2023-02-28 16:29 ` Oliver Kiddle [this message]
2023-03-01 12:54   ` Felipe Contreras
2023-02-28 19:36 ` Bart Schaefer
2023-03-08  4:04 ` [PATCH v4] " Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74532-1677601785.546332@Gkr5.eJZU.TqFp \
    --to=opk@zsh.org \
    --cc=felipe.contreras@gmail.com \
    --cc=roman.perepelitsa@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).