# 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