]> asedeno.scripts.mit.edu Git - git.git/blobdiff - parse-options.h
parseopt: add flag to stop on first non option
[git.git] / parse-options.h
index a8760ac4b288a44d6404d0550b9640b49789d39d..0d40cd2f124edfd68d23c69433e95bd0d5796282 100644 (file)
@@ -18,12 +18,14 @@ enum parse_opt_type {
 
 enum parse_opt_flags {
        PARSE_OPT_KEEP_DASHDASH = 1,
+       PARSE_OPT_STOP_AT_NON_OPTION = 2,
 };
 
 enum parse_opt_option_flags {
        PARSE_OPT_OPTARG  = 1,
        PARSE_OPT_NOARG   = 2,
        PARSE_OPT_NONEG   = 4,
+       PARSE_OPT_HIDDEN  = 8,
 };
 
 struct option;
@@ -57,6 +59,8 @@ typedef int parse_opt_cb(const struct option *, const char *arg, int unset);
  *   PARSE_OPT_OPTARG: says that the argument is optionnal (not for BOOLEANs)
  *   PARSE_OPT_NOARG: says that this option takes no argument, for CALLBACKs
  *   PARSE_OPT_NONEG: says that this option cannot be negated
+ *   PARSE_OPT_HIDDEN this option is skipped in the default usage, showed in
+ *                    the long one.
  *
  * `callback`::
  *   pointer to the callback to use for OPTION_CALLBACK.