]>
Commit | Line | Data |
---|---|---|
76dceb10 SK |
1 | _whereis_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 | '-B'|'-M'|'-S') | |
ce3e6b15 | 9 | local IFS=$'\n' |
76dceb10 SK |
10 | compopt -o filenames |
11 | COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) ) | |
12 | return 0 | |
13 | ;; | |
d4f9b8d7 VS |
14 | '-h'|'-V') |
15 | return 0 | |
16 | ;; | |
76dceb10 SK |
17 | esac |
18 | case $cur in | |
19 | -*) | |
d9b022bd | 20 | OPTS="-b -B -m -M -s -S -f -u -l -g" |
76dceb10 SK |
21 | COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) |
22 | return 0 | |
23 | ;; | |
24 | esac | |
e091d5b7 | 25 | COMPREPLY=( $(compgen -c -- $cur) ) |
76dceb10 SK |
26 | return 0 |
27 | } | |
28 | complete -F _whereis_module whereis |