Bug 1687861
| Summary: | Completion of git commands stopped working | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Honza Brázdil <jbrazdil> | ||||||||
| Component: | bash-completion | Assignee: | Siteshwar Vashisht <svashisht> | ||||||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 29 | CC: | kdudka, mrunge, ooprala, sheltren, svashisht | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | x86_64 | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2019-08-05 13:21:48 UTC | Type: | Bug | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Honza Brázdil
2019-03-12 13:53:28 UTC
Can I do anything to help investigate this? Bump Honza, could you please run the following command and attach strace.txt ? $ strace -e trace=%file -o strace.txt bash -l Created attachment 1592613 [details]
strace -e trace=%file -o strace.txt bash -l
Please try the following: 1. run `set -x` in your interactive bash session 2. try to autocomplete a git command 3. attach the text printed to your terminal Created attachment 1592647 [details]
git stat<TAB> with set -x
Not sure of the relevance, but I noticed in the output:
++++ git help -a
++++ egrep --color=auto '^ [a-zA-Z0-9]'
Doing
$ git help -a | egrep --color=auto '^ [a-zA-Z0-9]'
returns nothing, because the commands have 3 spaces at the beginning of the line:
$ git help -a
See 'git help <command>' to read about a specific subcommand
Main Porcelain Commands
add Add file contents to the index
am Apply a series of patches from a mailbox
[...]
Created attachment 1592672 [details]
git stat<TAB> with set -x and sourced git completions
I tried it also with doing the source of /usr/share/bash-completion/completions/git file, the output looks quite different.
Please paste output of the following commands executed in a fresh bash session: $ complete | grep git\$ $ complete | grep D\$ $ declare -f _completion_loader $ complete | grep git\$
complete -o bashdefault -o default -o nospace -F _git git
$ complete | grep D\$
complete -F _completion_loader -D
$ declare -f _completion_loader
_completion_loader ()
{
local cmd="${1:-_EmptycmD_}";
__load_completion "$cmd" && return 124;
complete -F _minimal -- "$cmd" && return 124
}
(In reply to Honza Brázdil from comment #9) > $ complete | grep git\$ > complete -o bashdefault -o default -o nospace -F _git git Something in your configuration sets a completion hook for git that does not work. If you get rid of it, _completion_loader() will load the hook provided by git-core, which works fine. You can try to find culprit like this: $ grep -r 'complete.*git' /etc/{bash_completion,profile}.d If there is no match, look at the other sourced files, based on attachment #1592613 [details]. Thanks, it was because of third-party branch_in_prompt.sh script. Weird that it worked before but the script was not updated in a long time so it's probably outdated by now. Removing that script fixed it. Glad to see it resolved. Thank you for clarifying it! |