emacs-devel
[Top][All Lists]
Advanced

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

Re: Eshell's external pipe module interferes with other argument parsing


From: Sean Whitton
Subject: Re: Eshell's external pipe module interferes with other argument parsing hooks
Date: Sat, 16 Apr 2022 14:04:34 -0700
User-agent: Emacs/29.0.50 (x86_64-pc-linux-gnu)

Hello,

On Thu 31 Mar 2022 at 04:11PM -07, Jim Porter wrote:

> In practice, yes. However, the implementation could allow the other
> parsers to run, but then discard their parsed results during the rewrite
> phase if applicable. This is probably subject to a different set of
> unusual corner cases, but would allow other parsers to consume the parts
> of the command that they care about so that extpipe can just look for
> `*|' and friends. (A `*|' sequence inside quotes or something similar
> would already have been consumed by the time extpipe sees it.)

Okay, I think I see what you mean.  Worth keeping in mind.

> For the purposes of parsing, having the token that activates the extpipe
> module be at the beginning of the relevant portion would make things a
> lot easier. Then `eshell-parse-external-pipeline' can just check if
> that's the next token and if so, read until the end of the extpipe
> portion. That would eliminate all the complexity of trying to identify
> unquoted/literal `*|' operators.
>
> In practice though, I'm happy with any syntax so long as the
> implementation is robust. If the current implementation using `*|'
> operators is significantly nicer to use (I don't have an opinion either
> way since I haven't used it enough), then we should stick with it, even
> if it makes it harder to implement.

I think it's pretty nice to use, indeed.  But one thing that isn't so
easy that I would additionally like to have is just converting a single
command, with no pipes or redirection, to use the external shell.  You
can do something like append "*| cat" to your command but that's not
nice.  One possibility discussed previously was to support putting || at
the very beginning of the command to request that the whole thing be
sent to the external shell.  I'm still thinking I might add that.

-- 
Sean Whitton



reply via email to

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