You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-vcs/git-annex/files/git-annex.bash

20 lines
440 B

_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