From: Eric Sunshine Date: Fri, 11 May 2018 22:47:52 GMT Subject: Re: [PATCH 7/9] completion: drop the hard coded list of config vars Message-ID: In-Reply-To: <20180510141927.23590-8-pclouds@gmail.com> On Thu, May 10, 2018 at 10:19 AM Nguyễn Thái Ngọc Duy wrote: > The new help option --config-for-completion is a machine friendlier > version of --config where all the placeholders and wildcards are > dropped, leaving only the good, completable prefixes for > git-completion.bash to consume. > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/builtin/help.c b/builtin/help.c > @@ -446,9 +447,13 @@ int cmd_help(int argc, const char **argv, const char *prefix) > + int for_human = show_config == 1; > + > + if (for_human) > + setup_pager(); > + list_config_help(for_human); > + if (for_human) > + printf("\n%s\n", _("'git help config' for more information")); Simpler to read, perhaps: if (!for_human) list_config_help(0); else { setup_pager(); list_config_help(1); printf(...); }