2011-11-01 22:14:45 +02:00
|
|
|
# id(1) completion -*- shell-script -*-
|
2011-10-12 23:01:10 +03:00
|
|
|
|
|
|
|
_id()
|
|
|
|
{
|
|
|
|
local cur prev words cword
|
|
|
|
_init_completion || return
|
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
local opts=$( _parse_help "$1" )
|
|
|
|
[[ $opts ]] || opts="-G -g -u" # POSIX fallback
|
|
|
|
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
|
|
|
|
else
|
|
|
|
COMPREPLY=( $( compgen -u "$cur" ) )
|
|
|
|
fi
|
|
|
|
} &&
|
|
|
|
complete -F _id id
|
|
|
|
|
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|