help: add --config to list all available config
Sometimes it helps to list all available config vars so the user can search for something they want. The config man page can also be used but it's harder to search if you want to focus on the variable name, for example. This is not the best way to collect the available config since it's not precise. Ideally we should have a centralized list of config in C code (pretty much like 'struct option'), but that's a lot more work. This will do for now. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
a46baac61e
commit
3ac68a93fd
3
grep.c
3
grep.c
@ -7,6 +7,7 @@
|
||||
#include "diffcore.h"
|
||||
#include "commit.h"
|
||||
#include "quote.h"
|
||||
#include "help.h"
|
||||
|
||||
static int grep_source_load(struct grep_source *gs);
|
||||
static int grep_source_is_binary(struct grep_source *gs);
|
||||
@ -80,6 +81,8 @@ static int parse_pattern_type_arg(const char *opt, const char *arg)
|
||||
die("bad %s argument: %s", opt, arg);
|
||||
}
|
||||
|
||||
define_list_config_array_extra(color_grep_slots, {"match"});
|
||||
|
||||
/*
|
||||
* Read the configuration file once and store it in
|
||||
* the grep_defaults template.
|
||||
|
||||
Reference in New Issue
Block a user