]>
Commit | Line | Data |
---|---|---|
1 | _script_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 | '-c'|'--command') | |
9 | compopt -o bashdefault | |
10 | COMPREPLY=( $(compgen -c -- $cur) ) | |
11 | return 0 | |
12 | ;; | |
13 | '-E'|'--echo') | |
14 | COMPREPLY=( $(compgen -W "auto always never" -- $cur) ) | |
15 | return 0 | |
16 | ;; | |
17 | '-o'|'--output-limit') | |
18 | COMPREPLY=( $(compgen -W "size" -- $cur) ) | |
19 | return 0 | |
20 | ;; | |
21 | '-m'|'--logging-format') | |
22 | COMPREPLY=( $(compgen -W "classic advanced" -- $cur) ) | |
23 | return 0 | |
24 | ;; | |
25 | '-h'|'--help'|'-V'|'--version') | |
26 | return 0 | |
27 | ;; | |
28 | esac | |
29 | case $cur in | |
30 | '=') | |
31 | cur=${cur#=} | |
32 | ;; | |
33 | -*) | |
34 | OPTS="--append | |
35 | --command | |
36 | --echo | |
37 | --log-in | |
38 | --log-out | |
39 | --log-io | |
40 | --log-timing | |
41 | --logging-format | |
42 | --return | |
43 | --flush | |
44 | --force | |
45 | --quiet | |
46 | --output-limit | |
47 | --timing= | |
48 | --version | |
49 | --help" | |
50 | COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) | |
51 | return 0 | |
52 | ;; | |
53 | esac | |
54 | local IFS=$'\n' | |
55 | compopt -o filenames | |
56 | COMPREPLY=( $(compgen -f -- $cur) ) | |
57 | return 0 | |
58 | } | |
59 | complete -F _script_module script |