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



2011-10-24, 14:31(+01), Peter Stephenson:
[...]
> matchingfiles() {
>    emulate -L zsh
>    local -a files
>    files=(${~*}(N))

Shouldn't it be 
    files=(${^~*}(N))


>    (( ${#files} ))
> }
> if matchingfiles "OmniFocus.*.omnilicense"; then
>   ...
> fi
>
> in which you now do need the double quotes.

-- 
Stephane



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