On Thu, May 10, 2018 at 10:19 AM Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> 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 <pclouds@xxxxxxxxx> > --- > 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(...); }