~reviewer/hello-hut

ref: 05b11e83d429b8dc796116a590ac2d3865b314d0 hello-hut/contrib/completions/hello-hut.bash -rw-r--r-- 579 bytes
05b11e83 — Ines Moreau Add bash and zsh completions 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# bash completion for hello-hut
# Copy to ~/.local/share/bash-completion/completions/hello-hut

_hello_hut() {
    local cur opts
    cur="${COMP_WORDS[COMP_CWORD]}"
    opts="--shout --time-of-day --count --color --format --version --help"
    case "${COMP_WORDS[COMP_CWORD-1]}" in
        --color) COMPREPLY=($(compgen -W "auto always never" -- "$cur")); return ;;
        --format) COMPREPLY=($(compgen -W "text json" -- "$cur")); return ;;
    esac
    if [[ "$cur" == -* ]]; then
        COMPREPLY=($(compgen -W "$opts" -- "$cur"))
    fi
}
complete -F _hello_hut hello-hut