unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55620: 29.0.50; Eshell doesn't reset `eshell-in-pipeline-p' in subcommands
@ 2022-05-25  2:20 Jim Porter
  2022-05-25  3:37 ` bug#55620: [PATCH] " Jim Porter
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Porter @ 2022-05-25  2:20 UTC (permalink / raw)
  To: 55620

 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...





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-25 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25  2:20 bug#55620: 29.0.50; Eshell doesn't reset `eshell-in-pipeline-p' in subcommands Jim Porter
2022-05-25  3:37 ` bug#55620: [PATCH] " Jim Porter
2022-05-25 12:13   ` bug#55620: " Lars Ingebrigtsen

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).