_stargazer() {
    local i cur opts cmds
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    cmd=""
    opts=""

    for i in ${COMP_WORDS[@]}
    do
        case "${i}" in
            stargazer)
                cmd="stargazer"
                ;;
            
            *)
                ;;
        esac
    done

    case "${cmd}" in
        stargazer)
            opts="-D -d -h -V  --debug --dev --check-config --help --version"
            if [[ ${cur} == -* ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            else
                COMPREPLY=($(compgen -f "${cur}"))
                return 0
            fi
    esac
}

complete -F _stargazer -o bashdefault -o default stargazer
