useradd,userdel,usermod: Add -R/--root arg completion.

master
Ville Skyttä 2012-12-28 13:46:24 +02:00
parent 41a37d7679
commit 5c8279b818
3 changed files with 12 additions and 1 deletions

View File

@ -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
;;

View File

@ -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

View File

@ -24,6 +24,10 @@ _usermod()
COMPREPLY=( $( compgen -P "$prefix" -g -- "${cur##*,}" ) )
return 0
;;
-R|--root)
_filedir -d
return 0
;;
-s|--shell)
_shells
return 0