Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Some problems with recursive globbing
- X-seq: zsh-users 20189
- 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 18:46:58 +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=dR2pJEhS19pbMXD3IVq0xmG7rQ28rImdzOL1ZgVoS5o=; b=yz2Egaqk+YCo6UCIblylfwlUnSl7CwmIdlOw26O6ySQte2zEUxkG1K1hihNoKE/Bg+ 5DO2esgVxwzKdYCc1jN4A9bA0JzUjraA0WC7mruCx6U14jSVwp8eyGJow0AnjO2EfxQK AkOMarG/NyGiEdoOAFClcmgf7J8Bz6cau6QB2aIisTLkItisJQbvkMEMKJ+C1Ok41AMq TOJcsrCYFHIBp6kd8/br0/D+qym2MyWEmbScVXq2BELZMsjLKV2hFwIwVh4Qle4JpT1o bMhLGQ8KDVCocumJH6MMbufI2YNaQ7081jXkb2cKd4zpgGJlSeAZDuGE9TiMGuXvvCY1 tnaA==
- In-reply-to: <20150507165953.517b95b9@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>
Hmm, I still can't get this to work.
I tried this:
myfiles() {
emulate -L zsh
setopt LOCAL_OPTIONS EXTENDED_GLOB
local dir="${1:a}/"
local filepattern="${dir}**/*"
print -c ${~filepattern}
}
% cd /private/tmp/test\(1\)
% myfiles src
myfiles:8: no matches found: /private/tmp/test(1)/src/**/*
And then this:
myfiles() {
emulate -L zsh
setopt LOCAL_OPTIONS EXTENDED_GLOB
local dir="${(q)1:a}/"
local filepattern="${dir}**/*"
print -c ${~filepattern}
}
% cd /private/tmp/test\ 1
% myfiles src
myfiles:8: no matches found: /private/tmp/test\ 1/src/**/*
So it still fails on either parentheses or spaces, depending on if I quote
the parameter.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author