Skip to content

Commit

Permalink
useradd,userdel,usermod: Add -R/--root arg completion.
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Dec 28, 2012
1 parent 41a37d7 commit 5c8279b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion completions/useradd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _useradd()
-p|--password|-u|--uid|-Z|--selinux-user)
return 0
;;
-b|--base-dir|-d|--home-dir|-k|--skel)
-b|--base-dir|-d|--home-dir|-k|--skel|-R|--root)
_filedir -d
return 0
;;
Expand Down
7 changes: 7 additions & 0 deletions completions/userdel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ _userdel()
local cur prev words cword
_init_completion || return

case $prev in
-R|--root)
_filedir -d
return
;;
esac

if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
return 0
Expand Down
4 changes: 4 additions & 0 deletions completions/usermod
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ _usermod()
COMPREPLY=( $( compgen -P "$prefix" -g -- "${cur##*,}" ) )
return 0
;;
-R|--root)
_filedir -d
return 0
;;
-s|--shell)
_shells
return 0
Expand Down

0 comments on commit 5c8279b

Please sign in to comment.