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: Michael Albinus
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Date: Sat, 25 Dec 2021 14:51:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Sean Whitton <spwhitton@spwhitton.name> writes:

> Hello,

Hi Sean,

>> Maybe we could add it to the defaults. But at least I would
>> like to see it documented in the eshell manual, otherwise nobody will
>> know the effect of "!!".
>
> I'm attaching new patches which
>
> - switch !! to ||, because !! in shells typically has something to do
>   with rerunning the last command
>
> - activate the syntax by default -- I do use Eshell regularly myself,
>   and I don't believe that activating it by default is likely to disrupt
>   anyone's usage
>
> - adds a section to the Eshell manual introducing the new syntax.

Thanks! I've played a little bit with it.

>> And I have the impression, that the eshell history is not preserved any
>> longer, when I have applied these settings.
>
> I have not been able to reproduce this -- can you confirm?

Yep, the eshell history is there. However, it looks a little bit weird,
when I have applied '|| cat .emacs | grep a'. The history shows me
'eshell-shell-command "cat .emacs | grep a"' instead. I understand
what's meant, but is this convenient for an occasional eshell user?

>> It doesn't work for me. The reason is a little bit subtle: you use
>> `shell-file-name' in order to call a remote shell. In my case, it is
>> "/usr/local/bin/tcsh", which doesn't exist on the remote machine I've
>> used for testing.
>
> I was able to fix this by using `with-connection-local-variables'.
> Thank you for pointing out the problem.

This is fixed, indeed.

Thinking more about, perhaps we could solve it a little bit
differently. Eshell knows how to invoke external commands explicitly, by
prefixing the command with a star like '*ls'. What if we do it the same
with pipes? That means, '*|' would mean to call an external pipe. So my
command above would be 'cat .emacs *| grep a'. And an external pipe
shall convert all other commands in that line into external commands as
well, like '*cat .emacs *| *grep a'.

By this you wouldn't need your restore-unexpanded-input patch any more, yes?

WDYT?

Best regards, Michael.





reply via email to

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