Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Some problems with recursive globbing
- X-seq: zsh-users 20191
- From: Jesper Nygårds <jesper.nygards@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Some problems with recursive globbing
- Date: Thu, 7 May 2015 19:21:55 +0200
- 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==
- In-reply-to: <20150507180045.0afc79fd@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CABZhJg-f_PDTtaJf8Fg6qVZQ2wLmAXG-tLXLub7Sq=GW9vXwDA@mail.gmail.com> <20150507165250.18184e1a@pwslap01u.europe.root.pri> <20150507165953.517b95b9@pwslap01u.europe.root.pri> <CABZhJg_2uhT-c1Gn+e+=ng3o4L=P8LJRZukjF3T7LqwiGL1OHQ@mail.gmail.com> <20150507180045.0afc79fd@pwslap01u.europe.root.pri>
On Thu, May 7, 2015 at 7:00 PM, Peter Stephenson <p.stephenson@xxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author