unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Milan Zimmermann <milan.zimmermann@gmail.com>, 59403@debbugs.gnu.org
Subject: bug#59403: 29.0.50; Variable with value starting with dash "-" fails to create
Date: Sat, 19 Nov 2022 22:50:18 -0800	[thread overview]
Message-ID: <11b62a1d-c3f3-04a3-7ebf-3a0c90e9ade4@gmail.com> (raw)
In-Reply-To: <CAEc2VK2EcKS8ep6XePZ5aQVTAuW5G=1xXxccjFqU=Lnzw6Ss4A@mail.gmail.com>

On 11/19/2022 10:08 PM, Milan Zimmermann wrote:
> Actual:
> 
> ~/dev $ export a="-anything"
> ~/dev $ echo $a
> echo: unrecognized option -a
> ~/dev/ $ echo "$a"
> echo: unrecognized option -a
> 
> Expected:
> 
> ~/dev $ export a="-anything"
> ~/dev $ echo $a
> -anything
> ~/dev/ $ echo "$a"
> -anything
[snip]
> Major mode: Eshell

Eshell's 'echo' command works somewhat different from other shells (in 
more ways than just this). The Eshell way to spell this is:

   ~ $ echo -- $a
   -anything

(Maybe this could be a feature enhancement for Eshell's echo, but "--" 
is the usual way to do this sort of thing with other commands, at least 
these days. Arguably, this makes Eshell's echo better, since it's more 
consistent with those other commands... at the expense of being less 
consistent with other implementations of echo.)






  reply	other threads:[~2022-11-20  6:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-20  6:08 bug#59403: 29.0.50; Variable with value starting with dash "-" fails to create Milan Zimmermann
2022-11-20  6:50 ` Jim Porter [this message]
2022-11-21  8:50 ` bug#59403: GNU bug report logs - #59403 " Milan Zimmermann
2022-11-21 18:03   ` Jim Porter
2022-11-22  2:09     ` Milan Zimmermann

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=11b62a1d-c3f3-04a3-7ebf-3a0c90e9ade4@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=59403@debbugs.gnu.org \
    --cc=milan.zimmermann@gmail.com \
    /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).