Subject: Re: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Jan 2022 09:34:25 +0200

> From: Sean Whitton <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Tue, 18 Jan 2022 16:16:01 -0700
> 
> >   >foo something or other
> >
> > in Eshell, and have the output of 'something' redirected to 'foo'?  If
> > it is possible today, will it be possible after your changes, and what
> > will happen with that if 'something' includes the new "*|" pipe
> > symbol?
> 
> Interestingly, it's not possible to do that with plain Eshell.  If
> someone modifies Eshell's parsing to make it possible, I do not believe
> it will interact with em-extpipe.el in any meaningful way.

If it doesn't work now, then we cannot break it.

> Even though
> 
>     >blah echo "Hello"
> 
> doesn't work, with my patch, these three do, and all output to "blah":
> 
>     *>blah echo "Hello"
>     echo "Hello" *| cat >blah
>     echo "Hello" *| >blah cat

These work because they delegate to the shell, and the shell does
DTRT.

> If you do
> 
>     >blah echo "Hello" *| rev
> 
> then on my system, "blah" contains "Hello", not "olleH", as it looks
> like GNU bash prioritises the output redirection over the pipe.

Of course.  If you want "olleH" in "blah", you need to do this
instead:

   echo "Hello" *| >blah rev

Thanks.