From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 742 invoked from network); 24 Mar 2005 01:25:20 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Mar 2005 01:25:20 -0000 Received: (qmail 34467 invoked from network); 24 Mar 2005 01:25:14 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Mar 2005 01:25:14 -0000 Received: (qmail 6055 invoked by alias); 24 Mar 2005 01:25:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21059 Received: (qmail 6041 invoked from network); 24 Mar 2005 01:25:10 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 24 Mar 2005 01:25:10 -0000 Received: (qmail 34104 invoked from network); 24 Mar 2005 01:25:09 -0000 Received: from tantale.fifi.org (64.81.251.130) by a.mx.sunsite.dk with SMTP; 24 Mar 2005 01:25:04 -0000 Received: from ceramic.fifi.org (Debian-exim@ceramic.fifi.org [64.81.251.131]) by tantale.fifi.org (8.9.3p2/8.9.3/Debian 8.9.3-21) with ESMTP id RAA19738; Wed, 23 Mar 2005 17:25:01 -0800 Received: from phil by ceramic.fifi.org with local (Exim 4.34) id 1DEH5p-0000K0-As; Wed, 23 Mar 2005 17:25:01 -0800 To: Dave Yost Cc: zsh-workers@sunsite.dk Subject: Re: there should be a way to echo with quotes or escaping References: Mail-Copies-To: nobody From: Philippe Troin Date: 23 Mar 2005 17:25:01 -0800 In-Reply-To: Message-ID: <87fyylbzte.fsf@ceramic.fifi.org> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 Dave Yost 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.