# luseradd(1) and lusermod(1) completion -*- shell-script -*- proc _luseradd { local cur prev words cword split _init_completion -s || return match $prev { with -\?|--help|--usage|-c|--gecos|-u|--uid|-l|--login|-P|--plainpassword|\ -p|--password|--commonname|--givenname|--surname|--roomnumber|\ --telephonenumber|--homephone return with -d|--directory|-k|--skeleton _filedir -d return with -s|--shell _shells return with -g|--gid _gids return } $split && return if [[ "$cur" == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace return } [[ ${1##*/} == luseradd ]] || setglobal COMPREPLY = ''( $( compgen -u -- "$cur" ) ) } && complete -F _luseradd luseradd lusermod # ex: ts=4 sw=4 et filetype=sh