1 # Programmable Bash command completion for the ‘xkcdpass’ command.
2 # See the Bash manual “Programmable Completion” section.
6 _xkcdpass_completion () {
9 local cur="${COMP_WORDS[COMP_CWORD]}"
10 local prev="${COMP_WORDS[COMP_CWORD-1]}"
12 local opts="-h --help -V --verbose"
13 opts+=" -w --wordfile -v --valid-chars -a --acrostic"
14 opts+=" -n --numwords --min --max"
15 opts+=" -c --count -d --delimiter"
19 COMPREPLY=( $(compgen -A file -- ${cur}) )
23 COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
28 complete -F _xkcdpass_completion xkcdpass
35 # vim: fileencoding=utf-8 filetype=bash :