From: Eric Sunshine Date: Thu, 01 Feb 2018 09:54:02 GMT Subject: Re: [PATCH v2 01/41] parse-options: support --git-completion-helper Message-ID: In-Reply-To: On Wed, Jan 31, 2018 at 7:05 PM, Duy Nguyen wrote: > On Thu, Feb 1, 2018 at 4:04 AM, Eric Sunshine wrote: >> On Wed, Jan 31, 2018 at 6:05 AM, Nguyễn Thái Ngọc Duy 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.