[PATCH v3 04/42] git-completion.bash: introduce __gitcomp_builtin

2018-02-09 Thread Nguyễn Thái Ngọc Duy
This is a __gitcomp wrapper that will execute git ... --git-completion-helper to get the list of completable options. The call will be made only once and cached to avoid performance issues, especially on Windows. __gitcomp_builtin() allows callers to change its output a bit by adding some mo

Re: [PATCH v3 04/42] git-completion.bash: introduce __gitcomp_builtin

2018-02-09 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +# This function is equivalent to > +# > +#__gitcomp "$(git xxx --git-completion-helper) ..." > +# > +# except that the output is cached. Accept 1-3 arguments: > +# 1: the git command to execute, this is also the cache key > +# 2: extra options to be added on t

Re: [PATCH v3 04/42] git-completion.bash: introduce __gitcomp_builtin

2018-02-14 Thread SZEDER Gábor
Thanks for working on this. I anticipated that the completion script lack some options, but wow, I didn't expect that there are so many missing. On Fri, Feb 9, 2018 at 12:01 PM, Nguyễn Thái Ngọc Duy wrote: > This is a __gitcomp wrapper that will execute > > git ... --git-completion-helper >

Re: [PATCH v3 04/42] git-completion.bash: introduce __gitcomp_builtin

2018-02-23 Thread Duy Nguyen
On Wed, Feb 14, 2018 at 10:35 PM, SZEDER Gábor wrote: >> +__gitcomp_builtin () > > Please excuse the bikeshed at v3, but I don't like the name of this > function. It indicates that it completes builtins, but it completes > options of builtins, and even then only the options of those using parse >