-
-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom git completion does not work as expected #546
Comments
Do you have
Another possibility would be that the |
Correct, git is in array completions, defined in bashrc.
I did check, same behavior, it only loads aliases on ~/.gitconfig, not commonly used commands like status and commit. |
Thanks. What is the result of the following command in the session where the completion settings are not correctly loaded? $ complete -p git Also, could you share the content of the custom git completion file (after your modification)? |
This is the result.
Sure, this is the content of ~/.ohmybash/custom/completions/git.completion.bash:
|
Sorry for the delay. The completion settings seem to be correctly loaded. Maybe the specific version of the completion in $ (shopt -s extdebug; declare -F __git_wrap__git_main ) This should show the filename that defined the shell function |
yields: Keep in mind I had to manually add: Thanks for the help! |
Thanks. What is the result of the same command in a session where the completion doesn't properly work (i.e., the session without the manual I'd like the result in a session with the problem since I'm currently asking the question to identify the cause of the problem. You can temporarily comment out the line of the manual |
The culprit is the default bash completion: (Ran this in a shell while the manual source was commented out) |
Any idea why this is happening? |
Sorry for the delay. I think bash-completion is already loaded when Is the system As a workaround, I think you can perform |
Correct, the /usr/bin/git is older than the /nfs counterpart.
I will give it a shot and get back with the test results, thanks once again for your help :) |
Update: Unfortunately, this workaround does not work for me. I think I will keep the manual source |
Tested on Centos 7, git version 2.35.2
Expected:
Actual:
4. Custom completions for git have not been included, the completion only works for aliases under ~/.gitconfig configuration file
Workaround:
[bashrc]: source "$OSH/tools/git-completion.bash"
Am I missing something here?
Thank you,
Atrestis
The text was updated successfully, but these errors were encountered: