Re: [PATCH v2 01/41] parse-options: support --git-completion-helper
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 1, 2018, 09:54 UTC
- Message-ID
- <CAPig+cSLYDJaxCyAH_zK0cat2-60OZGWGy_ZLHwitHfZ7oA78w@mail.gmail.com>
- In-Reply-To
- <CACsJy8B0D=u5fGA2QWuG6QG-fmReg=GayC54+pSFjXHDrnKh3w@mail.gmail.com>
On Wed, Jan 31, 2018 at 7:05 PM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 20 quoted lines
> On Thu, Feb 1, 2018 at 4:04 AM, Eric Sunshine <sunshine@sunshineco.com> wrote: >> On Wed, Jan 31, 2018 at 6:05 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote: >>> Dangerous/Unpopular >>> options could be hidden with the new "NOCOMPLETE" flag. >> >> I wonder if this option should be named DANGEROUS rather than >> NOCOMPLETE to better reflect its intention. > > It's not only for dangerous options (I forgot to mention this in the > commit message, I will in v3). The --continue|--abort|--skip should > only show up when you are in a middle of rebase/am/cherry-pick. > git-completion.bash handles this case separately and only put them in > the completion list when appropriate. --git-completion-helper must > not include these or the trick done by git-completion.bash becomes > useless. > > Interesting. So we now have two classes of "no complete". One can't be > configurable (--continue|--abort|--skip) and one can. I'll use two > separate flags for these, though I'm not adding the configuration > option right now.
I don't see that as convincing argument for two classes of "no complete". Since git-completion.bash already special-cases rebase/am/cherry-pick for --continue|--abort|--skip, it is not far fetched that that special-case treatment can be extended slightly to also filter out those three options from the list returned by --git-completion-helper.
So, if that special case is handled entirely by the completion script, then that leaves only the "dangerous" options, which requires only a single flag.