forked from bylee20/bomi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbomi.completion
More file actions
30 lines (26 loc) · 800 Bytes
/
bomi.completion
File metadata and controls
30 lines (26 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# bomi completions -*- shell-script -*-
_bomi()
{
local short_release="-h -v"
local long_completes="--wake --open --action --log-level --opengl-debug \
--debug --help --version"
local debug_opts="fatal error warn info debug trace"
local cur=${COMP_WORDS[COMP_CWORD]}
local prev=${COMP_WORDS[COMP_CWORD-1]}
case "${prev}" in
--log-level)
COMPREPLY=( $(compgen -W "$debug_opts" -- $cur) )
return 0
;;
esac
if [[ "$cur" == --* ]]; then
COMPREPLY=( $(compgen -W "$long_completes" -- $cur) )
return 0
elif [[ "$cur" == -* ]]; then
COMPREPLY=( $(compgen -W "$short_release" -- $cur) )
else
_filedir
return 0
fi
}
complete -F _bomi bomi