Re: Some sub-commands can't be completed by TAB key.
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jan 22, 2022, 14:47 UTC
- Message-ID
- <5373af01-eeae-fb66-e9f7-41f2a022b275@kdbg.org>
- In-Reply-To
- <CAGP6POJ9gwp+t-eP3TPkivBLLbNb2+qj=61Mehcj=1BgrVOSLA@mail.gmail.com>
Am 22.01.22 um 09:42 schrieb Hongyi Zhao:
Show 12 quoted lines
> I find that there are some sub-commands can't be completed by TAB key: > > $ git <TAB> > add cherry-pick fetch latexdiff > [...] > As you can see, there are some sub-commands which are not listed in > the above list, for example, the following ones: > > $ git ls-remote > $ git ls-files > > Any hints for this problem?
Tab completion is only available for user-facing sub-commands ("porcelain"), but not for sub-commands intended for scripting ("plumbing"). The intent is to make tab completion more efficient during day-to-day work on the command line. For example,
$ git l<TAB>
arrives at
$ git log <cursor here>
instead of
log ls-files ls-remote ls-tree $ git l<cursor here>
-- Hannes