~reviewer/hello-hut

ref: 5306422adf89ae9f8902ba5a85f4963cc79f5557 hello-hut/contrib/completions/hello-hut.bash -rw-r--r-- 579 bytes
5306422a — Jun Takahashi tests: cover config parsing edge cases 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