From: Philippe Troin <phil@fifi.org>
To: Dave Yost <Dave@Yost.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: there should be a way to echo with quotes or escaping
Date: 23 Mar 2005 17:25:01 -0800 [thread overview]
Message-ID: <87fyylbzte.fsf@ceramic.fifi.org> (raw)
In-Reply-To: <pdy988306210204be6796f21c1b@[192.168.1.2]>
Dave Yost <Dave@Yost.com> 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.
next prev parent reply other threads:[~2005-03-24 1:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-23 22:00 Dave Yost
2005-03-24 1:25 ` Philippe Troin [this message]
2005-03-24 2:03 ` Dave Yost
2005-03-24 2:55 ` Bart Schaefer
2005-03-24 1:34 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fyylbzte.fsf@ceramic.fifi.org \
--to=phil@fifi.org \
--cc=Dave@Yost.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).