From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20729 invoked from network); 26 Apr 2002 02:07:37 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Apr 2002 02:07:37 -0000 Received: (qmail 23245 invoked by alias); 26 Apr 2002 02:06:54 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4880 Received: (qmail 23228 invoked from network); 26 Apr 2002 02:06:51 -0000 Date: Thu, 25 Apr 2002 19:06:42 -0700 (PDT) From: Bart Schaefer Sender: schaefer@ns1.sodaware.com To: Joshua Symons cc: zsh-users@sunsite.dk Subject: Re: Preexec & Printf In-Reply-To: <2569b26067.260672569b@mysun.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 25 Apr 2002, Joshua Symons wrote: > ${(qV)1} appears to be doing the job in 3.1.9, in 3.0.8 (the version > that comes with solaris 9) or 3.0.6 (the version that comes with solaris > 8) it gives a syntax error. > However with ${(QV)1} I still get garbage into my shell. ${(q)...} adds a level of quoting, and ${(Q)...} removes a level. Per Geoff's message, the (q) is "working" because it quotes the backslashes and so forth, protecting e.g. \a from being emitted as control-G by print. However, what you said you wanted was to remove the quotes, so that's why I suggested (Q). That doesn't solve the backslashing problem. You could try ${(q)${QV)1}} which would first remove the quotes and then escape the backslashes, or you can stick with just ${(qV)1}.