PageRenderTime 39ms CodeModel.GetById 37ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/bash_completion_lib/complete/id

http://github.com/brinkman83/bashrc
#! | 20 lines | 14 code | 6 blank | 0 comment | 0 complexity | 21c1f89849259018780c947a7cf47635 MD5 | raw file
 1# id(1) completion
 2
 3
 4comp_include _get_cword
 5
 6
 7_id()
 8{
 9    local cur
10
11    COMPREPLY=()
12    cur=`_get_cword`
13
14    if [[ "$cur" == -* ]]; then
15        COMPREPLY=( $( compgen -W '-a -g --group -G --groups -n --name\
16            -r --real -u --user --help --version' -- $cur ) )
17    else
18        COMPREPLY=( $( compgen -u $cur  ) )
19    fi
20} # _id()