summaryrefslogtreecommitdiff
path: root/completions/useradd
diff options
context:
space:
mode:
Diffstat (limited to 'completions/useradd')
-rw-r--r--completions/useradd20
1 files changed, 10 insertions, 10 deletions
diff --git a/completions/useradd b/completions/useradd
index fa8e58cc..8e095441 100644
--- a/completions/useradd
+++ b/completions/useradd
@@ -9,27 +9,27 @@ _useradd()
# with -u/--uid
case $prev in
- -c|--comment|-h|--help|-e|--expiredate|-f|--inactive|-K|--key|\
- -p|--password|-u|--uid|-Z|--selinux-user)
+ --comment|--help|--expiredate|--inactive|--key|--password|--uid|\
+ --selinux-user|-!(-*)[chefKpuZ])
return
;;
- -b|--base-dir|-d|--home-dir|-k|--skel|-R|--root)
+ --base-dir|--home-dir|--skel|--root|-!(-*)[bdkR])
_filedir -d
return
;;
- -g|--gid)
+ --gid|-!(-*)g)
_gids
- COMPREPLY=( $( compgen -W '${COMPREPLY[@]} $( compgen -g )' \
- -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '${COMPREPLY[@]} $(compgen -g)' \
+ -- "$cur") )
return
;;
- -G|--groups)
+ --groups|-!(-*)G)
local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
- COMPREPLY=( $( compgen -g -- "${cur##*,}" ) )
+ COMPREPLY=( $(compgen -g -- "${cur##*,}") )
[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
return
;;
- -s|--shell)
+ --shell|-!(-*)s)
_shells
return
;;
@@ -38,7 +38,7 @@ _useradd()
$split && return
[[ "$cur" == -* ]] && \
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
} &&
complete -F _useradd useradd