GNU bug report logs -
#46351
28.0.50; Add convenient way to bypass Eshell's own pipelining
Previous Next
Reported by: Sean Whitton <spwhitton <at> spwhitton.name>
Date: Sat, 6 Feb 2021 20:07:01 UTC
Severity: wishlist
Tags: patch
Found in version 28.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #28 received at 46351 <at> debbugs.gnu.org (full text, mbox):
Sean Whitton <spwhitton <at> 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.
This bug report was last modified 3 years and 114 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.