summaryrefslogtreecommitdiff
path: root/dev-python/ebuildtester/files/ebuildtester.bash-completion
blob: b8e7cd27c39320bf953bfa13a5c08c198978847c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
_ebuildtester() {
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts="--help --portage-dir --atom --threads"

    if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
        return 0
    fi

    case "${prev}" in
        --portage-dir)
            COMPREPLY=( $(compgen -o dirnames -A directory ${cur}) )
            ;;
    esac

}
complete -F _ebuildtester ebuildtester