Begin packaging upstream version “1.4.3”.
[debian_xkcdpass.git] / debian / xkcdpass.bash-completion
blobc4e054c6369af0c7e6d7374b46cbbb3afd03fc93
1 # Programmable Bash command completion for the ‘xkcdpass’ command.
2 # See the Bash manual “Programmable Completion” section.
4 shopt -s progcomp
6 _xkcdpass_completion () {
7     COMPREPLY=()
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"
17     case "${prev}" in
18         -w|--wordfile)
19             COMPREPLY=( $(compgen -A file -- ${cur}) )
20             ;;
22         *)
23             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
24             ;;
25     esac
28 complete -F _xkcdpass_completion xkcdpass
31 # Local variables:
32 # coding: utf-8
33 # mode: shell-script
34 # End:
35 # vim: fileencoding=utf-8 filetype=bash :