From: Jim Porter <jporterbugs@gmail.com>
To: 55620@debbugs.gnu.org
Subject: bug#55620: 29.0.50; Eshell doesn't reset `eshell-in-pipeline-p' in subcommands
Date: Tue, 24 May 2022 19:20:59 -0700 [thread overview]
Message-ID: <b7cd14b8-3473-5d9f-2848-67a9b29e392d@gmail.com> (raw)
From `emacs -Q -f eshell':
~ $ echo $eshell-in-pipeline-p
;; no output
~ $ echo ${echo $eshell-in-pipeline-p}
;; no output
~ $ echo ${echo $eshell-in-pipeline-p} | cat
first
(Note: in the first two cases, `eshell-in-pipeline-p' is nil, so there's
no output.) The last case is surprising: it's true that the inner `echo'
invocation is in a pipeline, but the pipeline is a level above it
(`first' means that when `eshell-in-pipeline-p' was evaluated, it was
the first command in a pipeline). Since the inner `echo' is effectively
in a subshell, it makes more sense for the value of
`eshell-in-pipeline-p' to be nil for the last case.
While this is a seemingly-obscure issue, there is one practical effect
that might bite users: currently, the Eshell implementation of `cat'
only works when *not* in a pipeline. Usually, it'll just fall back to
using the real system `cat' program if the Eshell version doesn't work,
but on systems without `cat' (e.g. MS Windows), you get the following error:
~ $ echo ${cat file.txt} | echo
Eshell’s ‘cat’ does not work in pipelines
Patch forthcoming momentarily; just getting a bug number...
next reply other threads:[~2022-05-25 2:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 2:20 Jim Porter [this message]
2022-05-25 3:37 ` bug#55620: [PATCH] 29.0.50; Eshell doesn't reset `eshell-in-pipeline-p' in subcommands Jim Porter
2022-05-25 12:13 ` bug#55620: " Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7cd14b8-3473-5d9f-2848-67a9b29e392d@gmail.com \
--to=jporterbugs@gmail.com \
--cc=55620@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).