howdy/autocomplete.sh
2018-02-10 17:03:42 +01:00

12 lines
238 B
Bash

_howdy() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="help list add remove clear"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
}
complete -F _howdy howdy