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

Re: zsh: no matches found



On Sun, Mar 20, 2005 at 11:04:44PM -0200, Toshiro wrote:
> Is this the only way? In other shells this is implemented in a very
> simple way, if the wildcard can be expanded, then it is expanded,
> otherwise an asterisk is sent as an argument to the application. 

Yes, other shells do it that way, but that has its downsides.  For
instance, if you run "touch *,c" it's better to get "no match" rather
than creating a useless *,c file.  Or if you type a command like this:
"rsync -avP *.html *.shmtl *.php host:/dest/" (note the misspelling),
it is better to get a "no match" error right away than to get a single
open-error embedded in all the output that you then have to figure out
at the end of the transfer.  I much prefer to simply put single quotes
around any wild-carded file names that should not be expanded rather
than to configure the shell to include a wildcard that didn't match
anything.  YMMV, of course, but if you give it a try, you may find that
you come to prefer it as well.

..wayne..



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