bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Sean Whitton
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Date: Mon, 27 Dec 2021 11:13:29 -0700
User-agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu)

Hello Michael,

On Mon 27 Dec 2021 at 03:42PM +01, Michael Albinus wrote:

>> I have one unresolved design question.  A disadvantage of your proposal
>> compared to mine is that it is much more laborious to convert an
>> existing pipeline to use the external shell: you have to replace each |
>> with *| and > with *>, etc., instead of just putting || at the
>> beginning.
>
> Yep, but this isn't relevant for the user. This replacement shall happen
> by eshell itself, in the background. And it isn't necessary to show this
> replacement by the commands in the history.
>
>> I think it's important that it is easy to switch this feature on and
>> off, because it is often only after you start figuring out a pipeline
>> that you realise you ought to bypass Eshell's pipelining.
>
> As I said: switching on this feature just needs the asterisk to *|.
>
>> One option would be to add an entry to `eshell-expand-input-functions'
>> which converts all | to *| and > to *> when the input begins with ||.
>> But that is too simple, because you need to parse the input to know
>> which | to replace ... any ideas?  I don't think it can be done inside
>> `eshell-parse-command'.
>
> Again, I don't see the need for the heading ||. When there is a *| in
> the command line, DTRT.

What I had in mind was a pipeline involving more than two commands, e.g.

    foo | bar | baz >quux

Indeed, this is exactly the sort of pipeline you might want this feature
for.  But the user would have to manually insert three asterisks to turn
on this feature.  That seems pretty inconvenient -- any thoughts on how
to improve it?

-- 
Sean Whitton





reply via email to

[Prev in Thread] Current Thread [Next in Thread]