From 7e29b8254f08af820b2f0c3770836638ffe517ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 21 Apr 2012 11:44:32 +0700 Subject: Add column layout skeleton and git-column MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- parse-options.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'parse-options.h') diff --git a/parse-options.h b/parse-options.h index 2e811dc7d..56fcafda5 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 -- cgit v1.2.1