Linda Walsh writes:
> So all I need do is test the first entry:
> 
>    local -a entries=("$1"/*)
>    [[ ${entries[0]} == $1/* ]] && return 0
> 
> --- the $1 doesn't need quotes in [[]] and '*' won't expand or
> am missing something?  Thanks for the tip Pierre, I often
> don't see forests because of all the trees...

The RHS of [[ has pattern matching applied on unquoted parts, so yes,
you probably want quotes around $1.

Attachment: pgpLMqnvOrGcV.pgp
Description: PGP signature

Reply via email to