On Tue, May 29, 2018 at 8:48 PM, Stefan Beller <sbeller@xxxxxxxxxx> wrote: > On Sun, May 27, 2018 at 1:38 AM, Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote: >> The commands that make use of --git-completion-helper feature could >> now produce a lot of --no-xxx options that a command can take. This in >> many case could nearly double the amount of completable options, using >> more screen estate and also harder to search for the wanted option. >> >> This patch attempts to mitigate that by collapsing extra --no- >> options, the ones that are added by --git-completion-helper and not in >> original struct option arrays. The "--no-..." option will be displayed >> in this case to hint about more options, e.g. >> >> > ~/w/git $ git clone -- >> --bare --origin= >> --branch= --progress >> --checkout --quiet >> --config= --recurse-submodules >> --depth= --reference= >> --dissociate --reference-if-able= >> --filter= --separate-git-dir= >> --hardlinks --shallow-exclude= >> --ipv4 --shallow-since= >> --ipv6 --shallow-submodules >> --jobs= --shared >> --local --single-branch >> --mirror --tags >> --no-... --template= >> --no-checkout --upload-pack= >> --no-hardlinks --verbose >> --no-tags > > https://public-inbox.org/git/20180527083828.6919-1-pclouds@xxxxxxxxx/ > " There's no magic numbers (previously we keep 3 --no- options)" > > Here I see 3 no- options, is the number how many no's to show configurable now? In a sense, yes. If you write OPT_BOOL(0, "no-foo",...) then that --no-foo _always_ shows. "git clone" just happens to have three of them. -- Duy