summaryrefslogtreecommitdiff
path: root/parse-options.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-04-21 11:44:32 +0700
committerJunio C Hamano <gitster@pobox.com>2012-04-27 09:26:37 -0700
commit7e29b8254f08af820b2f0c3770836638ffe517ab (patch)
treea30cbc7e6997728a87f15093b13da82738a9dc91 /parse-options.h
parentb082687cbac951d31bdea346404db5d0b99a0b73 (diff)
downloadgit-7e29b8254f08af820b2f0c3770836638ffe517ab.tar.gz
Add column layout skeleton and git-column
A column option string consists of many token separated by either a space or a comma. A token belongs to one of three groups: - enabling: always, never and auto - layout mode: currently plain (which does not layout at all) - other future tuning flags git-column can be used to pipe output to from a command that wants column layout, but not to mess with its own output code. Simpler output code can be changed to use column layout code directly. Thanks-to: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r--parse-options.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse-options.h b/parse-options.h
index 2e811dc7da..56fcafda5a 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -238,5 +238,7 @@ extern int parse_opt_noop_cb(const struct option *, const char *, int);
PARSE_OPT_OPTARG, &parse_opt_abbrev_cb, 0 }
#define OPT__COLOR(var, h) \
OPT_COLOR_FLAG(0, "color", (var), (h))
+#define OPT_COLUMN(s, l, v, h) \
+ { OPTION_CALLBACK, (s), (l), (v), "style", (h), PARSE_OPT_OPTARG, parseopt_column_callback }
#endif