~reviewer/hello-hut

ref: 2c669e6e11f837044759d40b8992601a1bd3d2c2 hello-hut/contrib/completions/hello-hut.bash -rw-r--r-- 579 bytes
2c669e6e — Dana Whitfield README: add an options table and a roadmap 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