Files
gentoo/dev-vcs/git-annex/files/git-annex.bash
Sergei Trofimovich 4d009207c2 dev-vcs/git-annex: bump up to 6.20160923, bug #591831
Reported-by: Jonas Stein
Package-Manager: portage-2.3.1
2016-09-24 10:55:07 +01:00

20 lines
440 B
Bash

_git_annex()
{
local cmdline
local IFS=$'
'
CMDLINE=(--bash-completion-index $COMP_CWORD)
if [[ "${COMP_WORDS[@]:0:2}" == "git annex" ]]; then
unset COMP_WORDS[0]
COMP_WORDS[1]="git-annex"
fi
for arg in ${COMP_WORDS[@]}; do
CMDLINE=(${CMDLINE[@]} --bash-completion-word $arg)
done
COMPREPLY=( $(/usr/bin/git-annex "${CMDLINE[@]}") )
}
complete -o filenames -F _git_annex git-annex