zsh-workers
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: zsh-workers@zsh.org, Oliver Kiddle <opk@zsh.org>, dana <dana@dana.is>
Subject: Re: [PATCH] prompt: support generic non-visible regions
Date: Thu, 11 Aug 2022 14:23:50 -0500	[thread overview]
Message-ID: <CAMP44s31Q75TcF4Wn9woPbKO8fcC=-WDqfQV8Z8G-55oz_HLvQ@mail.gmail.com> (raw)
In-Reply-To: <CAN=4vMqwjOtABPgDsXioP7NBxw=O3RRbDt7ZB7CLHtTR-omvPw@mail.gmail.com>

On Thu, Aug 11, 2022 at 12:24 PM Roman Perepelitsa
<roman.perepelitsa@gmail.com> wrote:
>
> On Thu, Aug 11, 2022 at 4:37 PM Roman Perepelitsa
> <roman.perepelitsa@gmail.com> 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.

That's easy. The current code in prompt.c uses Inpar and Outpar, which
are 0x88 and 0x8A respectively. If instead we do:

#define invis_start ((char) 0x01)
#define invis_end   ((char) 0x02)

And replace Inpar/Outpar with invis_start/invis_end the code should
behave identically (since those characters are removed).

Then in promptexpand() we simply not remove them.

I'm not sure if leaking these characters is what we want though.

-- 
Felipe Contreras


  parent reply	other threads:[~2022-08-11 19:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 11:51 Felipe Contreras
2022-08-10 18:59 ` Mikael Magnusson
2022-08-10 19:56   ` Felipe Contreras
2022-08-11 14:02     ` Mikael Magnusson
2022-08-11 14:26       ` Felipe Contreras
2022-08-11 18:32         ` Mikael Magnusson
2022-08-11 18:47           ` Felipe Contreras
2022-08-11 18:54             ` Mikael Magnusson
2022-08-11 19:46               ` Felipe Contreras
2022-08-11 20:38                 ` Bart Schaefer
2022-08-11 23:22                   ` Felipe Contreras
2022-08-11 14:37 ` Roman Perepelitsa
2022-08-11 15:21   ` Bart Schaefer
2022-08-11 16:20     ` Felipe Contreras
2022-08-11 16:49       ` Bart Schaefer
2022-08-11 18:48         ` Felipe Contreras
2022-08-11 17:24   ` Roman Perepelitsa
2022-08-11 18:55     ` Roman Perepelitsa
2022-08-11 19:23     ` Felipe Contreras [this message]
2022-08-11 19:35       ` Roman Perepelitsa
2022-08-11 19:44         ` 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to='CAMP44s31Q75TcF4Wn9woPbKO8fcC=-WDqfQV8Z8G-55oz_HLvQ@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=dana@dana.is \
    --cc=opk@zsh.org \
    --cc=roman.perepelitsa@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.vuxu.org/mirror/zsh/

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).