# Source from or copy to ~/.bashrc
function _complete_runcommands {
    local words=""

    for word in "${COMP_WORDS[@]}"; do
        words="$words --word '$word'"
    done

    local candidates=$(runcommands-complete ${words} --index $COMP_CWORD)

    COMPREPLY=( $(compgen -W "${candidates}" -- $2) )
}
complete -F _complete_runcommands -o default run runcmd runcommand runcommands commands.py
