Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh adding single quotes as it pleases



On Thu, Sep 24, 2009, Jerry Rocteur wrote about "zsh adding single quotes as it pleases":
> [113] + set -x
> [113] + echo -a 'r0esmm/Bis1234/"XXX' XXX - 'XXXX"'
> -a r0esmm/Bis1234/"XXX XXX - XXXX"
> [113] + read line
> 
> zsh is adding single quotes..

Do you see this problem anywhere except in "set -x" output?
Because "set -x" output is known to be a bit different from what you
actually typed. You don't need your complex program to check it - you
can try set -x interactively:

$ echo "hi there"
+zsh:1> echo 'hi there'
hi there
/home/nyh$ echo hi\ there
+zsh:2> echo 'hi there'
hi there

Note how any kind of quoting is turned into a single quote on set -x's
output. Why does this bother you? (Or maybe I'm misunderstanding what
bothered you).

-- 
Nadav Har'El                        |     Thursday, Sep 24 2009, 6 Tishri 5770
nyh@xxxxxxxxxxxxxxxxxxx             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |The avalanche has already started. It is
http://nadav.harel.org.il           |too late for the pebbles to vote.



Messages sorted by: Reverse Date, Date, Thread, Author