24
19
if [[ $cur == -* ]]; then
25
COMPREPLY=( $( compgen -W '-c -D -v' -- "$cur" ) )
20
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
29
24
COMPREPLY=( $( compgen -W 'check start stop abort flush reload status \
30
25
set-permissions upgrade-configuration' -- "$cur" ) )
32
27
complete -F _postfix postfix
34
# postalias(1) and postmap(1)
38
local cur prev len idx
41
_get_comp_words_by_ref cur prev
53
if [[ $cur == -* ]]; then
54
COMPREPLY=( $( compgen -W '-N -f -i -n -o -p -r -v -w -c -d -q' \
59
if [[ "$cur" == *:* ]]; then
61
COMPREPLY=( $( compgen -f -- "${cur#*:}" ) )
65
for pval in $( /usr/sbin/postconf -m ); do
66
if [[ "$cur" == "${pval:0:$len}" ]]; then
67
COMPREPLY[$idx]="$pval:"
71
if [[ $idx -eq 0 ]]; then
73
COMPREPLY=( $( compgen -f -- "$cur" ) )
78
complete -F _postmap postmap postalias
84
local cur prev pval len idx qfile
87
_get_comp_words_by_ref cur prev
96
if [[ $cur == -* ]]; then
97
COMPREPLY=( $( compgen -W '-c -q -v' -- "$cur" ) )
102
for idx in "${COMP_WORDS[@]}"; do
103
[[ "$idx" = -q ]] && qfile=1 && break
105
if [[ $qfile == 1 ]]; then
108
for pval in $( mailq 2>/dev/null | \
109
sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//' ); do
110
if [[ "$cur" == "${pval:0:$len}" ]]; then
111
COMPREPLY[$idx]=$pval
121
complete -F _postcat postcat
127
local cur prev pval len idx eqext
130
_get_comp_words_by_ref cur prev
147
if [[ $cur == -* ]]; then
148
COMPREPLY=( $( compgen -W '-A -a -b -c -d -e -h -m -l -n -t -v' \
155
for pval in $( /usr/sbin/postconf 2>/dev/null | cut -d ' ' -f 1 ); do
156
if [[ "$cur" == "${pval:0:$len}" ]]; then
157
COMPREPLY[$idx]="$pval$eqext"
163
complete -F _postconf postconf
169
local cur prev pval len idx
172
_get_comp_words_by_ref cur prev
182
for pval in ALL $( mailq 2>/dev/null | \
183
sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//' ); do
184
if [[ "$cur" == "${pval:0:$len}" ]]; then
185
COMPREPLY[$idx]=$pval
194
for pval in ALL $( mailq 2>/dev/null | \
195
sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* ].*$//; /!$/d' ); do
196
if [[ "$cur" == "${pval:0:$len}" ]]; then
197
COMPREPLY[$idx]=$pval
206
for pval in ALL $( mailq 2>/dev/null | \
207
sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//' ); do
208
if [[ "$cur" == "${pval:0:$len}" ]]; then
209
COMPREPLY[$idx]=$pval
217
if [[ $cur == -* ]]; then
218
COMPREPLY=( $( compgen -W '-c -d -h -H -p -r -s -v' -- "$cur" ) )
222
COMPREPLY=( $( compgen -W 'hold incoming active deferred' -- "$cur" ) )
224
complete -F _postsuper postsuper
230
# sh-indent-comment: t
231
# indent-tabs-mode: nil
233
29
# ex: ts=4 sw=4 et filetype=sh