-
Notifications
You must be signed in to change notification settings - Fork 3
/
bash_completion
88 lines (70 loc) · 2.27 KB
/
bash_completion
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env bash
_certhash_completion() {
if [[ ${2:0:1} = - ]]; then
COMPREPLY=($(compgen -W "--digest --help" -- "$2"))
elif [[ $3 = --digest ]]; then
COMPREPLY=($(compgen -W "sha1 sha512" -- "$2"))
else
COMPREPLY=($(compgen -f -- "$2"))
fi
return 0
}
complete -F _certhash_completion certhash
_enccnf_completion() {
if [[ ${2:0:1} = - ]]; then
COMPREPLY=($(compgen -W "--parse --build --remove --digest \
--tftp --certificate --key --help" -- "$2"))
elif [[ $3 = --digest ]]; then
COMPREPLY=($(compgen -W "sha1 sha512" -- "$2"))
else
COMPREPLY=($(compgen -f -- "$2"))
fi
return 0
}
complete -F _enccnf_completion enccnf
_mkcert_completion() {
if [[ ${2:0:1} = - ]]; then
COMPREPLY=($(compgen -W "--common --organization --unit --locality --state --country \
--years --bits --curve --digest --file --help" -- "$2"))
elif [[ $3 = --digest ]]; then
COMPREPLY=($(compgen -W "sha1 sha512" -- "$2"))
else
COMPREPLY=($(compgen -f -- "$2"))
fi
return 0
}
complete -F _mkcert_completion mkcert
_sgnfile_completion() {
if [[ ${2:0:1} = - ]]; then
COMPREPLY=($(compgen -W "--parse --build --remove --digest --tftp --help" -- "$2"))
elif [[ $3 = --digest ]]; then
COMPREPLY=($(compgen -W "sha1 sha512" -- "$2"))
else
COMPREPLY=($(compgen -f -- "$2"))
fi
return 0
}
complete -F _sgnfile_completion sgnfile
_stripsgn_completion() {
if [[ ${2:0:1} = - ]]; then
COMPREPLY=($(compgen -W "--help" -- "$2"))
else
COMPREPLY=($(compgen -f -- "$2"))
fi
return 0
}
complete -F _stripsgn_completion stripsgn
_tlvfile_completion() {
if [[ ${2:0:1} = - ]]; then
COMPREPLY=($(compgen -W "--parse --build --remove --version --digest --filename \
--sast --ccm --tftp --ccm-tftp --capf --app-server --tvs --help" -- "$2"))
elif [[ $3 = --digest ]]; then
COMPREPLY=($(compgen -W "sha1 sha512" -- "$2"))
elif [[ $3 = --version ]]; then
COMPREPLY=($(compgen -W "1.0 1.1" -- "$2"))
else
COMPREPLY=($(compgen -f -- "$2"))
fi
return 0
}
complete -F _tlvfile_completion tlvfile