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
31
32
33
34
35
36
37
38
39
40
|
# bash completion for sintel(1) -*- shell-script -*-
sintel_functions="$(sintel -l)"
sintel_modules="$(sintel -m)"
sintel_opts="-h --help --list-all --list-series --list-peliculas --find-series --find-peliculas --add-pelicula --list-episodios -d --detectar -f --function-call -n --function-call2 -l --list-functions -x -s --determine-series -i --is-downloaded --info -m --mods"
_sintel () {
local cur prev opts
_get_comp_words_by_ref cur prev
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${sintel_opts}" -- ${cur}) )
else
case "${prev}" in
-d|--detectar)
_filedir
;;
-f|--function-call)
COMPREPLY=( $(compgen -W "$sintel_functions" -- ${cur}) )
;;
-n|--function-call2)
COMPREPLY=( $(compgen -W "$sintel_functions" -- ${cur}) )
;;
-x)
COMPREPLY=( $(compgen -W "$sintel_modules" -- ${cur}) )
;;
--info)
COMPREPLY=( $(compgen -W "$sintel_functions" -- ${cur}) )
;;
*)
# dirs and torrents
#_filedir
;;
esac
fi
}
complete -F _sintel sintel
# ex: ts=4 sw=4 et filetype=sh
|