[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shell argument quoting woes
From: |
Rustom Mody |
Subject: |
Re: Shell argument quoting woes |
Date: |
Thu, 25 Jul 2013 07:51:05 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Thursday, July 25, 2013 7:00:32 PM UTC+5:30, Thorsten Jolitz wrote:
Seems to me that this inside lisp
> ,------------------------
> | prg -'fun \"strg\" num'
> `------------------------
> How can I quote such a 'cmd' string in a way that it finally arrives as
should be this
>
> ,------------------------
> | $ prg -'fun "strg" num'
> `------------------------
at the shell... No?
Anyway heres some (not too great) hacking:
(with my recently learnt from Bastien's C-j!)
(setq cmd "prg -'fun \"strg\" num'")
"prg -'fun \"strg\" num'"
(setq x (split-string cmd "-"))
("prg " "'fun \"strg\" num'")
(setq p (car (split-string (car x))))
"prg"
(setq arg (cadr x))
"'fun \"strg\" num'"
; (make-comint "buffer-name" p nil (concat "-" arg))