]>
Commit | Line | Data |
---|---|---|
76dceb10 SK |
1 | _look_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 | '-t'|'--terminate') | |
9 | COMPREPLY=( $(compgen -W "char" -- $cur) ) | |
10 | return 0 | |
11 | ;; | |
d4f9b8d7 VS |
12 | '-h'|'--help'|'-V'|'--version') |
13 | return 0 | |
14 | ;; | |
76dceb10 SK |
15 | esac |
16 | case $cur in | |
17 | -*) | |
0d5b9b8a | 18 | OPTS="--alternative --alphanum --ignore-case --terminate --version --help" |
76dceb10 SK |
19 | COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) |
20 | return 0 | |
21 | ;; | |
22 | esac | |
ce3e6b15 | 23 | local IFS=$'\n' |
76dceb10 SK |
24 | compopt -o filenames |
25 | COMPREPLY=( $(compgen -f -- $cur) ) | |
26 | return 0 | |
27 | } | |
28 | complete -F _look_module look |