summaryrefslogtreecommitdiffstats
path: root/completions/postfix
blob: a05f71f588b401a124819ce9aa036cfb65a717ef (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
# postfix(1) completion                                    -*- shell-script -*-

_comp_cmd_postfix()
{
    local cur prev words cword comp_args
    _comp_initialize -- "$@" || return

    case $prev in
        -c)
            _comp_compgen_filedir -d
            return
            ;;
        -D)
            _comp_compgen -- -W 'start'
            return
            ;;
    esac

    if [[ $cur == -* ]]; then
        _comp_compgen_usage -c _comp_try_faketty "$1" --help
        return
    fi

    _comp_compgen -- -W 'check start stop abort flush reload status
        set-permissions upgrade-configuration'
} &&
    complete -F _comp_cmd_postfix postfix

# ex: filetype=sh