[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add shell-quasiquote.
From: |
Wolfgang Jenkner |
Subject: |
Re: [PATCH] Add shell-quasiquote. |
Date: |
Thu, 22 Oct 2015 15:09:11 +0200 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix) |
On Thu, Oct 22 2015, Jeff Clough wrote:
> While dash is a variant of a variant of the Bourne shell, can we
> say with reasonable certainty that those variations don't impact
> shell-quote-argument?
That a backslash quotes any following character (except newlines) seems
to be true since the Thompson shell, cf.
http://v6shell.org/
I've played around a bit with (the FreeBSD port of) sh6 from the site
above using
(defun test--shell-quote-argument (arg &optional shell)
(let* ((shell-file-name (or shell shell-file-name))
(qarg (shell-quote-argument arg))
(cmd (format "printf %%s %s" qarg))
(res (shell-command-to-string cmd)))
(list (string-equal arg res) arg qarg res)))
The only problem seems to be with newlines, unsurprisingly:
(test--shell-quote-argument "\n" "sh6")
==> (nil "
" "'
'" "syntax error
")
- Re: [PATCH] Add shell-quasiquote., (continued)
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Wolfgang Jenkner, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., John Wiegley, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Wolfgang Jenkner, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Jeff Clough, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Andreas Schwab, 2015/10/22
- Re: [PATCH] Add shell-quasiquote.,
Wolfgang Jenkner <=
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Paul Eggert, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., Wolfgang Jenkner, 2015/10/22
- Re: [PATCH] Add shell-quasiquote., David Kastrup, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Random832, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Random832, 2015/10/21
- Re: [PATCH] Add shell-quasiquote., Eli Zaretskii, 2015/10/21