Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: checking for file existence when I don't know the exact name



On 2011-10-24 14:31:04 +0100, Peter Stephenson wrote:
> The standard method is along the lines of:
> 
> matchingfiles() {
>    emulate -L zsh
>    local -a files
>    files=(${~*}(N))
>    (( ${#files} ))
> }

Wouldn't this be more efficient with files=(${~*}(N[1]))?

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author