Re: git git<tab> completes non-existent command `git gitk`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 24, 2020 at 9:27 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Matheus Tavares <matheus.bernardino@xxxxxx> writes:
>
> > In the meantime, you could use:
> >
> >       git config completion.commands -gitk
> >
> > To locally remove the completion for "gitk".
>
> I think an equivalent of this in-core would be the way to go.

I'm not sure I understand the idea, but would that be something along
these lines? Adding a "nocomplete" category in commands-list.txt, to
do the opposite of the "complete" we already have[1]. Then adding a
new group name to "--list-cmds" (such as "--list-cmds=completeonly"),
which would include the commands that are in "complete" and exclude
those in "nocomplete"? We then might be able to complete subcommands
with the output of:

git --list-cmds=list-mainporcelain,others,nohelpers,alias,completeonly,config

[1]: "nocomplete" would only be relevant in conjunction with
"list-mainporcelain", as the commands in the latter (as gitk) are
currently completed by default (even without "complete").

> I wonder if there are any commands other than gitk that cannot be
> invoked as a subcommand of "git" potty.

In the list suggested by git-completion, I think gitk is the only one
(if I haven't missed any).



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux