summaryrefslogtreecommitdiffstats
path: root/completions/groupmems
blob: c884be25e3df461cf6c8938097cb29fa8b55bf97 (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
# groupmems(8) completion                                  -*- shell-script -*-

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

    case $prev in
        -a | --add | -d | --delete)
            _comp_compgen -- -u
            return
            ;;
        -g | --group)
            _comp_compgen -- -g
            return
            ;;
        -R | --root)
            _comp_compgen_filedir -d
            return
            ;;
    esac

    _comp_compgen_help
} &&
    complete -F _comp_cmd_groupmems groupmems

# ex: filetype=sh