{"thread":{"id":"65221","subject":"bash completion bug: \"symbolic-ref\" subcommand doesn't complete","startedAt":"2026-03-12T16:14:19Z","lastAt":"2026-03-12T16:47:50Z","messageCount":4,"participants":["Andrey","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"538758","messageId":"c1e0c05b-c767-4fcc-859a-4da6b90c4497@gmail.com","threadId":"65221","inReplyTo":null,"subject":"bash completion bug: \"symbolic-ref\" subcommand doesn't complete","fromName":"Andrey","fromEmail":"butirsky@gmail.com","sentAt":"2026-03-12T16:14:16Z","receivedAt":"2026-03-12T16:14:19Z","isPatch":false,"sender":{"key":"butirsky@gmail.com","avatar":null},"body":"Bash can't complete some commands, e.g. symbolic-ref, bugreport, maybe \nothers.\n\nThese commands are not seen in the completion output:\n\n|$ git #press Tab\nadd               blame             citool            diff         gitk  \n             log               prune  refs              restore          \n  show submodule\nam                branch            clean             difftool         \ngrep              maintenance       pull remote            revert        \n     show-branch       switch\napply             bundle            clone             fetch        gui  \n              merge             push repack            rm                \nsparse-checkout   tag\narchive           checkout          commit format-patch      help        \n       mergetool  range-diff        replace           scalar            \nstage          whatchanged\nbackfill          cherry            config            fsck         init  \n             mv                rebase request-pull      send-email      \n   stash             worktree\nbisect            cherry-pick       describe          gc         \ninstaweb          notes             reflog reset             shortlog    \n       status |\n\n|\n|\n\nThere is no such problem with Zsh.\n\n[System Info]\nGNU bash, version 5.3.0(1)-release (x86_64-redhat-linux-gnu)\ngit version 2.53.0\nrust: disabled\ngettext: enabled\nlibc info: glibc: 2.42\n\n"},{"id":"538765","messageId":"xmqqikb1ggri.fsf@gitster.g","threadId":"65221","inReplyTo":"c1e0c05b-c767-4fcc-859a-4da6b90c4497@gmail.com","subject":"Re: bash completion bug: \"symbolic-ref\" subcommand doesn't complete","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-12T16:21:53Z","receivedAt":"2026-03-12T16:21:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrey <butirsky@gmail.com> writes:\n\n> Bash can't complete some commands, e.g. symbolic-ref, bugreport, maybe \n> others.\n\nIsn't this working as intended?\n\nOur general principle is that the plumbing commands are not designed\nto be \"typed\" by end-user to use interactively, and cat-file,\ncommit-tree, etc. are not completed to reduce cluttering when the\nuser does\n\n\t$ git <TAB>\n\nIf zsh completion includes plumbing commands, then zsh completion is\nbuggy, or those who designed zsh completion did not understand the\ngeneral principle ;-).\n"},{"id":"538766","messageId":"edc6cbe7-905c-4eb7-9829-5c41f2a8beb0@gmail.com","threadId":"65221","inReplyTo":"xmqqikb1ggri.fsf@gitster.g","subject":"Re: bash completion bug: \"symbolic-ref\" subcommand doesn't complete","fromName":"Andrey","fromEmail":"butirsky@gmail.com","sentAt":"2026-03-12T16:26:57Z","receivedAt":"2026-03-12T16:27:00Z","isPatch":false,"sender":{"key":"butirsky@gmail.com","avatar":null},"body":" From what I can see, the file supplying the completion is common for \nbash/zsh, but still, the behavior is different:\n\n|$ head /usr/share/bash-completion/completions/git\n# bash/zsh completion support for core Git.\n...|\n\n|\n|\n\nOn 3/12/26 19:21, Junio C Hamano wrote:\n> Andrey <butirsky@gmail.com> writes:\n>\n>> Bash can't complete some commands, e.g. symbolic-ref, bugreport, maybe\n>> others.\n> Isn't this working as intended?\n>\n> Our general principle is that the plumbing commands are not designed\n> to be \"typed\" by end-user to use interactively, and cat-file,\n> commit-tree, etc. are not completed to reduce cluttering when the\n> user does\n>\n> \t$ git <TAB>\n>\n> If zsh completion includes plumbing commands, then zsh completion is\n> buggy, or those who designed zsh completion did not understand the\n> general principle ;-).\n"},{"id":"538769","messageId":"57252c1e-69e6-4953-beb3-3cfd41cab857@gmail.com","threadId":"65221","inReplyTo":"xmqqikb1ggri.fsf@gitster.g","subject":"Re: bash completion bug: \"symbolic-ref\" subcommand doesn't complete","fromName":"Andrey","fromEmail":"butirsky@gmail.com","sentAt":"2026-03-12T16:47:47Z","receivedAt":"2026-03-12T16:47:50Z","isPatch":false,"sender":{"key":"butirsky@gmail.com","avatar":null},"body":"You forgot to mention the main thing:\n\n/usr/share/bash-completion/completions/git:\n\n...\n#   GIT_COMPLETION_SHOW_ALL_COMMANDS\n#\n#     When set to \"1\" suggest all commands, including plumbing commands\n#     which are hidden by default (e.g. \"cat-file\" on \"git ca<TAB>\").\n\nThanks for the tip, though.\n\n\nOn 3/12/26 19:21, Junio C Hamano wrote:\n> Isn't this working as intended?\n>\n> Our general principle is that the plumbing commands are not designed\n> to be \"typed\" by end-user to use interactively, and cat-file,\n> commit-tree, etc. are not completed to reduce cluttering\n"}]}