summaryrefslogtreecommitdiff
path: root/parse-options.h
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2009-05-07 21:45:42 +0200
committerJunio C Hamano <gitster@pobox.com>2009-05-09 00:29:50 -0700
commit51a9949eda7421a2dd9cb45b2110d6571ba09bbd (patch)
tree319237eb500050e73ddd9b6e5dee585a41dc4b69 /parse-options.h
parente0319ff5ed2b7927302389181449dcd029a26622 (diff)
downloadgit-51a9949eda7421a2dd9cb45b2110d6571ba09bbd.tar.gz
parseopt: add PARSE_OPT_NODASH
Add support for options that don't start with a dash. Initially, they don't accept arguments and can only be short options, i.e. consist of a single character. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r--parse-options.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/parse-options.h b/parse-options.h
index 77919a77fb..919b9b441f 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -33,6 +33,7 @@ enum parse_opt_option_flags {
PARSE_OPT_NONEG = 4,
PARSE_OPT_HIDDEN = 8,
PARSE_OPT_LASTARG_DEFAULT = 16,
+ PARSE_OPT_NODASH = 32,
};
struct option;
@@ -66,8 +67,11 @@ typedef int parse_opt_cb(const struct option *, const char *arg, int unset);
* PARSE_OPT_OPTARG: says that the argument is optional (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.
+ * PARSE_OPT_HIDDEN: this option is skipped in the default usage, and
+ * shown only in the full usage.
+ * PARSE_OPT_LASTARG_DEFAULT: if no argument is given, the default value
+ * is used.
+ * PARSE_OPT_NODASH: this option doesn't start with a dash.
*
* `callback`::
* pointer to the callback to use for OPTION_CALLBACK.