# vipw(8) and vigr completion                              -*- shell-script -*-

_vipw()
{
    local cur prev words cword
    _init_completion || return

    case $prev in
        --help | -!(-*)h)
            return
            ;;
        --root | -!(-*)R)
            _filedir -d
            return
            ;;
    esac

    COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
} &&
    complete -F _vipw vipw vigr

# ex: filetype=sh
