From: Philipp Stephani <p.stephani2@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: shell-quote-argument escapes '='
Date: Fri, 24 Apr 2020 18:13:34 +0200 [thread overview]
Message-ID: <CAArVCkQz=KvTfPnOvQoW0f0rEiAB4ydfyQMUv=ergnQtEakARw@mail.gmail.com> (raw)
In-Reply-To: <jwvpnbxovxv.fsf-monnier+emacs@gnu.org>
Am Fr., 24. Apr. 2020 um 15:29 Uhr schrieb Stefan Monnier
<monnier@iro.umontreal.ca>:
>
> > (shell-quote-argument "a=b")
> >
> > I get:
> >
> > "a\\=b"
>
> Which is the printed representation of the string that contains
> 4 characters:
>
> a\=b
>
> > That's wrong, because it does not work in Bash:
> >
> > $ echo "a\\=b"
> > a\=b
>
> You're not supposed to put quotes around nor to double the backslash:
>
> $ echo a\=b
> a=b
> $
>
Note that those two aren't the same. The command
a=b
sets the variable 'a' to the string 'b'. The command
a\=b
runs a function/command/binary called 'a=b'. So not quoting = (i.e.
replicating the printf %q behavior) would be a breaking change.
prev parent reply other threads:[~2020-04-24 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1235716199.473564.1587731751300.ref@mail.yahoo.com>
2020-04-24 12:35 ` shell-quote-argument escapes '=' R. Diez
2020-04-24 13:28 ` Stefan Monnier
2020-04-24 16:13 ` Philipp Stephani [this message]
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='CAArVCkQz=KvTfPnOvQoW0f0rEiAB4ydfyQMUv=ergnQtEakARw@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.
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).