# juju-core completion

_juju()
{
    local cur prev options files targets
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    actions=$(juju help commands 2>/dev/null | awk '{print $1}')
    COMPREPLY=( $( compgen -W "${actions}" -- ${cur} ) )
    return 0
}
complete -F _juju juju
