[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shell-quote-argument escapes '='
From: |
R. Diez |
Subject: |
shell-quote-argument escapes '=' |
Date: |
Fri, 24 Apr 2020 12:35:51 +0000 (UTC) |
Hallo all:
I am running a self-compiled Emacs version 26.2 on Ubuntu 18.04.4 LTS. I
normally use Bash as a shell.
When I evaluate the following in Emacs:
(shell-quote-argument "a=b")
I get:
"a\\=b"
That's wrong, because it does not work in Bash:
$ echo "a\\=b"
a\=b
But even if I am getting confused with Emacs' string escaping, echo "a\=b" does
not work either.
I am looking for the equivalent in Emacs for Bash' printf "%q" escaping/quoting:
$ printf "%q" "a=b"
a=b
I though I might just copy and modify shell-quote-argument, but it is too
complicated for my limited Lisp skills.
I do not need any flexibility or configuration, I just need to emulate the
behaviour of Bash' printf "%q".
Thanks in advance for any help,
rdiez
- shell-quote-argument escapes '=',
R. Diez <=