i use alias which adds some parameters to some program.for example:alias git.home='git --git-dir=$HOME/.git.home/'complete -o bashdefault -o default -o nospace -F _git git.home \  2>/dev/null || complete -o default -o nospace -F _git git.homeit works with bash-completion v.1:2.0-1 (debian 7 wheezy):tab completes parameters and options for alias git.home as well as for original git.but with bash-completion v.1:2.1-4 (debian 8 jessie) after typing git.home and pressing tab i get this error:bash: completion: function `_git' not foundhow to re-use existing completion (for example for git) with recent versions of package bash-completion?updatefound partial solution: do source /usr/share/bash-completion/completions/git before complete ...but i get another error - git.home log + space + tab results in:fatal: Not a git repository (or any of the parent directories): .git  HEAD
how to re-use existing completion with recent bash-completion?
bash;debian;autocomplete
updatedsolution for alias git.home, which operates with ~/.git.home as repo.partially based on this answer.add to ~/.bashrc:alias git.home='git --git-dir=$HOME/.git.home/'_completion_loader giteval $(complete -p git | sed -r 's/(\s)git$/\1git.home/')eval $(type __gitdir |   sed '1d;1,/if/s|if|if [[ $COMP_LINE == git.home * ]]; then\necho $HOME/.git.home\nelif|')explanation of last eval (for other lines see answer):we are patching the function __gitdir(), which returns a path to the git repo dir. from:$ type __gitdir | head -n 4__gitdir is a function__gitdir () {     if [ -z ${1-} ]; thento:$ type __gitdir | head -n 7__gitdir is a function__gitdir () {     if [[ $COMP_LINE == git.home * ]]; then        echo $HOME/.git.home;    else        if [ -z ${1-} ]; theni.e., if command starts with a git.home , function returns $HOME/.git.home.