Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Short-circuiting array-subscript glob qualifier?
- X-seq: zsh-users 8773
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Short-circuiting array-subscript glob qualifier?
- Date: Tue, 03 May 2005 16:29:50 +0000
- In-reply-to: <44613de005050307262622832e@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <44613de005050307262622832e@xxxxxxxxxxxxxx>
On May 3, 10:26am, Shawn Halpenny wrote:
}
} echo /foo/bar/**/^*,v(.[1,3])
}
} I want it to echo the first three matching non-,v plain files.
} Unfortunately, zsh still retrieves all filenames that match the glob.
Yep, that's right. All qualifiers that work on the file names (rather
than on the filesystem attributes) are applied once to the entire list
after the glob is done. Well, that's not quite right -- expressions
evaluated with (e:...:) are applied to each file as it is found, too,
but there's no provision for that to short-circuit the entire glob.
} How possible is it to have the glob stop as soon as the first 3
} matches are found?
Can't be done using glob patterns.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author