Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
On 10/21/2015 08:03 AM, Bernhard Voelker wrote:
>
> One approach would be to have another first-pass getopt_long()
> loop for searching --help only:
>
> $ src/chmod-OLD --reference --help
> src/chmod-OLD: missing operand
> Try 'src/chmod-OLD --help' for more information.
>
> $ src/chmod --reference --help | head -n3
> src/chmod: unrecognized option '--reference'
> Usage: src/chmod [OPTION]... MODE[,MODE]... FILE...
Eww. I don't like that, because it is likely to misinterpret valid
command lines:
chmod --reference --help .
must be synonymous with:
chmod --reference ./--help .
and NOT print help output. Any two-pass system MUST treat
long-option-requiring-argument the same in both passes.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc Description: OpenPGP digital signature