Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: there should be a way to echo with quotes or escaping
- X-seq: zsh-workers 21059
- From: Philippe Troin <phil@xxxxxxxx>
- To: Dave Yost <Dave@xxxxxxxx>
- Subject: Re: there should be a way to echo with quotes or escaping
- Date: 23 Mar 2005 17:25:01 -0800
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <pdy988306210204be6796f21c1b@[192.168.1.2]>
- Mail-copies-to: nobody
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <pdy988306210204be6796f21c1b@[192.168.1.2]>
Dave Yost <Dave@xxxxxxxx> writes:
> Z% echo "abc def"
> abc def
> Z% echoquoted "abc def"
> 'abc def'
> Z% echoescaped "abc def"
> abc\ def
> Z%
>
> or some such
>
> If there is such a feature, I didn't see it mentioned under the echo
> command in the man page.
% a="foo' bar"
% echo ${(q)a}
foo\'\ bar
% echo ${(qq)a}
'foo'' bar'
% echo ${(qqq)a}
"foo' bar"
Note that I have rc_quotes set, otherwise:
% echo ${(qq)a}
'foo'\'' bar'
Phil.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author