Re: [PATCH v3 01/42] parse-options: support --git-completion-helper

2018-12-02 Thread Ævar Arnfjörð Bjarmason
On Fri, Feb 09 2018, Nguyễn Thái Ngọc Duy wrote: > +static int show_gitcomp(struct parse_opt_ctx_t *ctx, > + const struct option *opts) > +{ Says it returns 'static int'... > [...] > + exit(0); Then just exits... > + /* lone --git-completion-helper is aske

[PATCH v3 01/42] parse-options: support --git-completion-helper

2018-02-09 Thread Nguyễn Thái Ngọc Duy
This option is designed to be used by git-completion.bash. For many simple cases, what we do in there is usually __gitcomp "lots of completion options" which has to be manually updated when a new user-visible option is added. With support from parse-options, we can write __gitcomp "$(git