argotk.sh 308 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
_argotk.hs()
{
    local CMDLINE
    local IFS=$'\n'
    CMDLINE=(--bash-completion-index $COMP_CWORD)

    for arg in ${COMP_WORDS[@]}; do
        CMDLINE=(${CMDLINE[@]} --bash-completion-word $arg)
    done

    COMPREPLY=( $(./argotk.hs "${CMDLINE[@]}") )
}

complete -o filenames -F _argotk.hs argotk.hs