From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14326 invoked by alias); 7 May 2015 17:22:13 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20191 Received: (qmail 17890 invoked from network); 7 May 2015 17:21:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=kD2UoizrYMQpbImznx+KX9M5x126j2Fb3PLl5+iDI14=; b=c0UW+BnUsL66+tSMi9suUdk1doB+9QW4AA/m+mJMt0MRg5OC9G8mnj1371m0nQRcNJ i3m0XlA3cRiJEfKGuEs2dwcf0UxMeP8dTmoByWJ6X2acwY5y98Dgkfe7h8Z7ZjBfqswa Zf25Phnnj1n2PolRc9z36b986kroBbLYB083ZgpDanjoMciWhT4IujziCcFURjMWk1fQ LPIamnfV8Xha+27O51Zt//3WJ+38yKyTgSU7I3Ln8Ej99+RhYkmxFnvxH2dsOl+bq3R6 Mv3MY9sMpnwngqNymQTDSR2tIoVe2oA1+fqSm7mFZX818Jls0Bdi+QOT9yTMBQTJcb4w LDAg== MIME-Version: 1.0 X-Received: by 10.152.4.72 with SMTP id i8mr4041272lai.32.1431019315348; Thu, 07 May 2015 10:21:55 -0700 (PDT) In-Reply-To: <20150507180045.0afc79fd@pwslap01u.europe.root.pri> References: <20150507165250.18184e1a@pwslap01u.europe.root.pri> <20150507165953.517b95b9@pwslap01u.europe.root.pri> <20150507180045.0afc79fd@pwslap01u.europe.root.pri> Date: Thu, 7 May 2015 19:21:55 +0200 Message-ID: Subject: Re: Some problems with recursive globbing From: =?UTF-8?Q?Jesper_Nyg=C3=A5rds?= To: Zsh Users Content-Type: multipart/alternative; boundary=089e01494248f54afe0515812519 --089e01494248f54afe0515812519 Content-Type: text/plain; charset=UTF-8 On Thu, May 7, 2015 at 7:00 PM, Peter Stephenson wrote: > $dir contains a straight string with unquoted parentheses. The > ~filepattern then turns those parentheses into pattern characters. > > Yes, I understand. > I'm not sure why you want filepattern anyway, but > > I tried to simplify my function to make my problem obvious. In my "real" function, I am collecting several function arguments into a combined pattern, which is why I need to use this indirect method. local filepattern="**/*" > print -c ${dir}${~filepattern} > > ought to work. Otherwise you'll need to quote metacharacters in dir, > which is possible but should be unnecessary. > Yes, but as my second example demonstrates: if I quote my filepattern, it then doesn't work for files with spaces in their names. I was hoping for a solution where it would be possible to get this to work for both situations. --089e01494248f54afe0515812519--