Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: <<<: Document newline behavior and fix optimization



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