how to correctly use __git_complete in ~/.bash_completion

Asked by kub1x

Hey, after some digging I put these into my ~/.bash_completion:
_xfunc git __git_complete g __git_main
_xfunc git __git_complete gl _git_log
_xfunc git __git_complete gd _git_diff
_xfunc git __git_complete gb _git_branch
_xfunc git __git_complete gfe _git_fetch
_xfunc git __git_complete gpu _git_pull

However the _xfunc used this way polutes my bash environment with all the _git functions (it simply sources them there) which I didn't want to. Is there a way to set bash_completion for git aliases and not source the entire git-completion into my bash environment?

Thanks in advance,

Question information

English Edit question
bash-completion Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :

This question was expired because it remained in the 'Open' state without activity for the last 15 days.