unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 12689@debbugs.gnu.org, Aidan Gauland <aidalgol@no8wireless.co.nz>
Subject: bug#12689: 24.2; Eshell ${cmd} substitution
Date: Mon, 2 May 2022 20:52:03 -0700	[thread overview]
Message-ID: <7af5ed95-30ec-43ab-4264-8e1d8a01cab2@gmail.com> (raw)
In-Reply-To: <871r0bhk9c.fsf@gnus.org>

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





  reply	other threads:[~2022-05-03  3:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20  8:06 bug#12689: 24.2; Eshell ${cmd} substitution Aidan Gauland
2014-12-14 12:44 ` samer
2015-02-24 10:56 ` Samer Masterson
2015-03-03 15:54   ` Eli Zaretskii
2015-03-04 12:14     ` Samer Masterson
2015-03-04 17:38       ` Eli Zaretskii
2015-03-05 10:34         ` Samer Masterson
2015-04-06  3:41           ` Samer Masterson
2015-04-06  4:19             ` John Wiegley
2015-04-06  4:54               ` Samer Masterson
2022-02-09  9:12 ` Lars Ingebrigtsen
2022-02-09 19:01   ` Jim Porter
2022-02-09 20:12     ` Lars Ingebrigtsen
2022-05-03  3:52       ` Jim Porter [this message]
2022-05-03 10:37         ` 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=7af5ed95-30ec-43ab-4264-8e1d8a01cab2@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=12689@debbugs.gnu.org \
    --cc=aidalgol@no8wireless.co.nz \
    --cc=larsi@gnus.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).