Closed RoggeHaj closed 1 year ago
That is explained in the code comments of the upstream git-completion file.
git/git - d15644fe
contrib/completion/git-completion.bash
:32-36# If you have a command that is not part of git, but you would still # like completion, you can use __git_complete: # # __git_complete gl git_log #
So I guess something like the following would work:
__git_complete gcb git_checkout
Note: The above line needs to be put in .bashrc
after source /path/to/oh-my-bash.sh
. Also, please do not forget to include git
in the completions
array.
Ah, the last paragraph did it! I tried running the __git_complete
command from my $OSH/custom folder and that did not work.
Many thanks for the quick response.
Hi,
I have a question on whether it's possible to enable completion for home brew bash functions? Currently we have a regular bash function
Code that hides under "Other stuff" makes it difficult to implement as a regular git alias. What I want to achieve is to have completion similar to what I get from
I'm totally happy with a solution to this specific case, but if there's a more general way to set things up it's even better.