git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matheus Tavares Bernardino <matheus.bernardino@usp.br>
To: Junio C Hamano <gitster@pobox.com>
Cc: Anthony Sottile <asottile@umich.edu>, git <git@vger.kernel.org>
Subject: Re: git git<tab> completes non-existent command `git gitk`
Date: Sun, 24 May 2020 22:53:53 -0300	[thread overview]
Message-ID: <CAHd-oW7b2191haSeoaBu4jvS+PBG04RKGxOhp7+rRQF+b9eErg@mail.gmail.com> (raw)
In-Reply-To: <xmqqlflgq2nr.fsf@gitster.c.googlers.com>

On Sun, May 24, 2020 at 9:27 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Matheus Tavares <matheus.bernardino@usp.br> 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).

      reply	other threads:[~2020-05-25  1:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23 22:25 git git<tab> completes non-existent command `git gitk` Anthony Sottile
2020-05-24 21:38 ` Matheus Tavares
2020-05-25  0:27   ` Junio C Hamano
2020-05-25  1:53     ` Matheus Tavares Bernardino [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHd-oW7b2191haSeoaBu4jvS+PBG04RKGxOhp7+rRQF+b9eErg@mail.gmail.com \
    --to=matheus.bernardino@usp.br \
    --cc=asottile@umich.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).