Re: [PATCH 1/4] parseopt: add PARSE_OPT_KEEP_UNKNOWN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> writes:

> Add a parseopt flag, PARSE_OPT_KEEP_UNKNOWN, that can be used to keep
> unknown options in argv, similar to the existing KEEP flags.

Very nice.

The only caveat I can think of is with PARSE_OPT_STOP_AT_NON_OPTION set
(which is not default), you can correctly handle:

	git cmd --known --unknown=value arg0 arg1

but cannot correctly handle:

	git cmd --known --unknown value arg0 arg1

An update to Documentation/technical/api-parse-options.txt that

 (1) describes this new option; and

 (2) warns about this issue.

It might even make sense to diagnose PARSE_OPT_STOP_AT_NON_OPTION used
together with PARSE_OPT_KEEP_UNKNOWN as a programming error.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux