find: If a part of an expression is unknown, do not call it an option.

Although most of the primaries and operators start with "-", they are not
options.

Examples:
  find . -xyz
  find . -name xyz -or bad

MFC after:	1 week
This commit is contained in:
Jilles Tjoelker 2011-05-27 22:14:49 +00:00
parent ff29f3b241
commit 702b4f04ea

View File

@ -172,7 +172,7 @@ find_create(char ***argvp)
argv = *argvp;
if ((p = lookup_option(*argv)) == NULL)
errx(1, "%s: unknown option", *argv);
errx(1, "%s: unknown primary or operator", *argv);
++argv;
new = (p->create)(p, &argv);