mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-01-09 20:33:34 -08:00
27 lines
619 B
Bash
27 lines
619 B
Bash
# groupadd(8) completion -*- shell-script -*-
|
|
|
|
_groupadd()
|
|
{
|
|
local cur prev words cword split
|
|
_init_completion -s || return
|
|
|
|
# TODO: if -o/--non-unique is given, could complete on existing gids
|
|
# with -g/--gid
|
|
|
|
case $prev in
|
|
--gid | --key | --password | -!(-*)[gKp])
|
|
return
|
|
;;
|
|
esac
|
|
|
|
$split && return
|
|
|
|
if [[ $cur == -* ]]; then
|
|
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
|
|
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
|
|
fi
|
|
} &&
|
|
complete -F _groupadd groupadd
|
|
|
|
# ex: filetype=sh
|