blob: b4f9614dd4be0767285b548cb805017d66e164ec (
plain)
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
41
42
43
|
_clzip ()
{
local cur prev
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
local opts_short opts_long
# clzip 1.11
opts_short="-h -V -a -b -c -d -f -F -k -l -m -o -q -s -S -t -v -0 -1 -2 -3 -4 -5 -6 -7 -8 -9"
opts_long="--help --version --trailing-error --member-size --stdout --decompress --force --recompress --keep --list --match-length --output --quiet --dictionary-size --volume-size --test --verbose --fast --best --loose-trailing"
case "${prev}" in
-o|--output)
# FIXME: file
;;
-b|--member-size|-m|--match-length|-s|--dictionary-size|-S|--volume-size)
# FIXME: byte
;;
esac
case "${cur}" in
--*)
COMPREPLY=( $( compgen -W "${opts_long}" -- ${cur} ) )
return 0
;;
-*)
COMPREPLY=( $( compgen -W "${opts_short}" -- ${cur} ) )
return 0
;;
*)
COMPREPLY=()
;;
esac
return 0
}
complete -F _clzip clzip
|