Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: <<<: Document newline behavior and fix optimization
- X-seq: zsh-workers 49839
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: PATCH: <<<: Document newline behavior and fix optimization
- Date: Sun, 13 Mar 2022 19:35:56 +0000
- Archived-at: <https://zsh.org/workers/49839>
- In-reply-to: <CAHYJk3S+R-nUtJtvQ=tkzAa3u6MCUFpV8mWtyiSHbfXCi7kg8A@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Mikael Magnusson <mikachu@xxxxxxxxx>, zsh-workers@xxxxxxx
- References: <20220308185832.27204-1-mikachu@gmail.com> <20220313185059.23ggfh5cchv5m7nw@chazelas.org> <CAHYJk3S+R-nUtJtvQ=tkzAa3u6MCUFpV8mWtyiSHbfXCi7kg8A@mail.gmail.com>
2022-03-13 20:28:35 +0100, Mikael Magnusson:
> On 3/13/22, Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
> > 2022-03-08 19:58:32 +0100, Mikael Magnusson:
> >> The =(<<<foo) optimization forgot to add a newline, but =(cat<<<foo)
> >> always did, make the behavior consistent, and document it.
> > [...]
> >
> > The edit-command-line contrib widget may be relying on =(<<<xxx)
> > not adding a newline character.
>
> The output from the editor is read with $() so I think it will cancel
> out, either way. Just tested invoking it and pressing enter a bunch of
> times, and was returned to an empty command line.
[...]
You're right sorry. I just came across the definition of that
widget and saw that =(<<<...) in it which reminded me of this
discussion. But I didn't look at it further.
If anything, your change would improved it, as at the moment, it
would likely launch a text editor on something that is not text
as it wouldn't end in a newline.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author