# Postfix completion.
#
comp_include _filedir _get_cword


_postfix()
{
    local cur prev

    cur=`_get_cword`
    prev=${COMP_WORDS[COMP_CWORD-1]}

    if [[ $cur == '-' ]]; then
        COMPREPLY=(-c -D -v)
        return 0
    fi
    if [[ $prev == '-c' ]]; then
        _filedir -d
        return 0
    fi
    if [[ $prev == '-D' ]]; then
        COMPREPLY=( $( compgen -W 'start' -- "${COMP_WORDS[COMP_CWORD]}" ) )
        return 0
    fi
    COMPREPLY=( $( compgen -W 'start stop reload abort flush check' -- \
        "${COMP_WORDS[COMP_CWORD]}" ) )
}
_postfix
