]>
Commit | Line | Data |
---|---|---|
76dceb10 SK |
1 | _mcookie_module() |
2 | { | |
3 | local cur prev OPTS | |
4 | COMPREPLY=() | |
5 | cur="${COMP_WORDS[COMP_CWORD]}" | |
6 | prev="${COMP_WORDS[COMP_CWORD-1]}" | |
7 | case $prev in | |
8 | '-f'|'--file') | |
ce3e6b15 | 9 | local IFS=$'\n' |
76dceb10 SK |
10 | compopt -o filenames |
11 | COMPREPLY=( $(compgen -f -- $cur) ) | |
12 | return 0 | |
13 | ;; | |
c6b1d511 SK |
14 | '-m'|'--max-size') |
15 | COMPREPLY=( $(compgen -W "bytes" -- $cur) ) | |
16 | return 0 | |
17 | ;; | |
d4f9b8d7 VS |
18 | '-h'|'--help'|'-V'|'--version') |
19 | return 0 | |
20 | ;; | |
76dceb10 SK |
21 | esac |
22 | case $cur in | |
23 | -*) | |
c6b1d511 | 24 | OPTS="--file --max-size --verbose --version --help" |
76dceb10 SK |
25 | COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) |
26 | return 0 | |
27 | ;; | |
28 | esac | |
29 | return 0 | |
30 | } | |
31 | complete -F _mcookie_module mcookie |