summaryrefslogtreecommitdiffstats
path: root/completions/id
blob: e91ad610e750328bf86cdf6e6eb94154ff055d2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# id(1) completion                                         -*- shell-script -*-

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

    if [[ $cur == -* ]]; then
        _comp_compgen_help ||
            _comp_compgen -- -W '-G -g -u' # POSIX fallback
    else
        _comp_compgen -- -u
    fi
} &&
    complete -F _comp_cmd_id id

# ex: filetype=sh