public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* bash completion bug: "symbolic-ref" subcommand doesn't complete
@ 2026-03-12 16:14 Andrey
  2026-03-12 16:21 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey @ 2026-03-12 16:14 UTC (permalink / raw)
  To: git

Bash can't complete some commands, e.g. symbolic-ref, bugreport, maybe 
others.

These commands are not seen in the completion output:

|$ git #press Tab
add               blame             citool            diff         gitk  
             log               prune  refs              restore          
  show submodule
am                branch            clean             difftool         
grep              maintenance       pull remote            revert        
     show-branch       switch
apply             bundle            clone             fetch        gui  
              merge             push repack            rm                
sparse-checkout   tag
archive           checkout          commit format-patch      help        
       mergetool  range-diff        replace           scalar            
stage          whatchanged
backfill          cherry            config            fsck         init  
             mv                rebase request-pull      send-email      
   stash             worktree
bisect            cherry-pick       describe          gc         
instaweb          notes             reflog reset             shortlog    
       status |

|
|

There is no such problem with Zsh.

[System Info]
GNU bash, version 5.3.0(1)-release (x86_64-redhat-linux-gnu)
git version 2.53.0
rust: disabled
gettext: enabled
libc info: glibc: 2.42


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bash completion bug: "symbolic-ref" subcommand doesn't complete
  2026-03-12 16:14 bash completion bug: "symbolic-ref" subcommand doesn't complete Andrey
@ 2026-03-12 16:21 ` Junio C Hamano
  2026-03-12 16:26   ` Andrey
  2026-03-12 16:47   ` Andrey
  0 siblings, 2 replies; 4+ messages in thread
From: Junio C Hamano @ 2026-03-12 16:21 UTC (permalink / raw)
  To: Andrey; +Cc: git

Andrey <butirsky@gmail.com> writes:

> Bash can't complete some commands, e.g. symbolic-ref, bugreport, maybe 
> others.

Isn't this working as intended?

Our general principle is that the plumbing commands are not designed
to be "typed" by end-user to use interactively, and cat-file,
commit-tree, etc. are not completed to reduce cluttering when the
user does

	$ git <TAB>

If zsh completion includes plumbing commands, then zsh completion is
buggy, or those who designed zsh completion did not understand the
general principle ;-).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bash completion bug: "symbolic-ref" subcommand doesn't complete
  2026-03-12 16:21 ` Junio C Hamano
@ 2026-03-12 16:26   ` Andrey
  2026-03-12 16:47   ` Andrey
  1 sibling, 0 replies; 4+ messages in thread
From: Andrey @ 2026-03-12 16:26 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

 From what I can see, the file supplying the completion is common for 
bash/zsh, but still, the behavior is different:

|$ head /usr/share/bash-completion/completions/git
# bash/zsh completion support for core Git.
...|

|
|

On 3/12/26 19:21, Junio C Hamano wrote:
> Andrey <butirsky@gmail.com> writes:
>
>> Bash can't complete some commands, e.g. symbolic-ref, bugreport, maybe
>> others.
> Isn't this working as intended?
>
> Our general principle is that the plumbing commands are not designed
> to be "typed" by end-user to use interactively, and cat-file,
> commit-tree, etc. are not completed to reduce cluttering when the
> user does
>
> 	$ git <TAB>
>
> If zsh completion includes plumbing commands, then zsh completion is
> buggy, or those who designed zsh completion did not understand the
> general principle ;-).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bash completion bug: "symbolic-ref" subcommand doesn't complete
  2026-03-12 16:21 ` Junio C Hamano
  2026-03-12 16:26   ` Andrey
@ 2026-03-12 16:47   ` Andrey
  1 sibling, 0 replies; 4+ messages in thread
From: Andrey @ 2026-03-12 16:47 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

You forgot to mention the main thing:

/usr/share/bash-completion/completions/git:

...
#   GIT_COMPLETION_SHOW_ALL_COMMANDS
#
#     When set to "1" suggest all commands, including plumbing commands
#     which are hidden by default (e.g. "cat-file" on "git ca<TAB>").

Thanks for the tip, though.


On 3/12/26 19:21, Junio C Hamano wrote:
> Isn't this working as intended?
>
> Our general principle is that the plumbing commands are not designed
> to be "typed" by end-user to use interactively, and cat-file,
> commit-tree, etc. are not completed to reduce cluttering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-12 16:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 16:14 bash completion bug: "symbolic-ref" subcommand doesn't complete Andrey
2026-03-12 16:21 ` Junio C Hamano
2026-03-12 16:26   ` Andrey
2026-03-12 16:47   ` Andrey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox