summaryrefslogtreecommitdiffstats
path: root/completions/groupmems
blob: 2e89a5ab40c1cef5746ee04a042d330f7ccc9e62 (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 -*-

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

    case $prev in
        -a | --add | -d | --delete)
            COMPREPLY=($(compgen -u -- "$cur"))
            return
            ;;
        -g | --group)
            COMPREPLY=($(compgen -g -- "$cur"))
            return
            ;;
        -R | --root)
            _filedir -d
            return
            ;;
    esac

    COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
} &&
    complete -F _groupmems groupmems

# ex: filetype=sh