GNU bug report logs - #12689
24.2; Eshell ${cmd} substitution

Previous Next

Package: emacs;

Reported by: Aidan Gauland <aidalgol <at> no8wireless.co.nz>

Date: Sat, 20 Oct 2012 08:09:02 UTC

Severity: normal

Found in version 24.2

Full log


Message #48 received at 12689 <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 12689 <at> debbugs.gnu.org, Aidan Gauland <aidalgol <at> no8wireless.co.nz>
Subject: Re: bug#12689: 24.2; Eshell ${cmd} substitution
Date: Mon, 2 May 2022 20:52:03 -0700
On 2/9/2022 12:12 PM, Lars Ingebrigtsen wrote:
> OK; I'm reopening this bug report, then.

I filed bug#55236 to fix some wider issues I encountered with Eshell 
expansions, which may also fix this bug. I think it depends on what 
exactly we want for the behavior here. With my patches in that bug, this 
is the behavior I get:

Default:

  ~ $ echo ${/bin/echo -e "foo\nbar"}
  ("foo" "bar")
  ~ $ echo ${/bin/echo -e "foo\nbar"}-baz
  ("foo" "bar-baz")
  ~ $ /bin/echo ${/bin/echo -e "foo\nbar"}
  foo bar
  ~ $ /bin/echo ${/bin/echo -e "foo\nbar"}-baz
  foo bar-baz

With `eshell-plain-echo-behavior' == t:

  ~ $ echo ${*echo -e "foo\nbar"}
  foo bar
  ~ $ echo ${*echo -e "foo\nbar"}-baz
  foo bar-baz
  ~ $ /bin/echo ${/bin/echo -e "foo\nbar"}
  foo bar
  ~ $ /bin/echo ${/bin/echo -e "foo\nbar"}-baz
  foo bar-baz

I think the "plain" echo behavior is what the original report expected, 
so maybe we can consider this fixed then. However, maybe we should 
consider whether the default, non-"plain" behavior should be changed. I 
don't have a strong opinion here, although I'm hesitant to make any big 
changes to the default behavior of Eshell's echo builtin, since I feel 
like it could break a lot of things really easily...




This bug report was last modified 3 years and 42 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.