GNU bug report logs - #46351
28.0.50; Add convenient way to bypass Eshell's own pipelining

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 46351 <at> debbugs.gnu.org, michael.albinus <at> gmx.de
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Date: Tue, 18 Jan 2022 16:45:07 +0200
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Mon, 17 Jan 2022 22:19:59 -0700
> 
> I've got it working.  Please let me know what you think of the attached.

Thanks.

I see you play some games with shell syntactic rules and such: IME,
these are often tricky enough to defeat simplistic handling.  For
example, does this support commands that have redirection operators
_before_ the first verb?  It's allowed in every shell I've seen,
albeit very rarely used.

I think Robert found another possible issue.

> +(cl-macrolet
> +    ((deftest (name input expected)
> +       (let ((result (gensym)))
> +         `(ert-deftest ,name ()
> +            (let* ((shell-file-name "sh") (shell-command-switch "-c")
> +                   (,result
> +                    (with-temp-eshell (eshell-parse-command ,input))))
> +              ;; Strip `eshell-trap-errors'.
> +              (should (equal (cadr ,result) ,expected)))))))
> +
> +  (deftest em-extpipe-test-1
> +           "foo *| bar >baz"
> +           '(eshell-named-command "sh"
> +                                  (list "-c" "foo | bar >baz")))

Why do these tests only look for 'sh' as the shell?  What is the
importance of the shell for this purpose?




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.