[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-83-g1d75b67
Ville Skyttä
ville.skytta at iki.fi
Fri Dec 28 11:48:47 UTC 2012
The following commit has been merged in the master branch:
commit 5c8279b818560146176372752c4a87c588207674
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Fri Dec 28 13:46:24 2012 +0200
useradd,userdel,usermod: Add -R/--root arg completion.
diff --git a/completions/useradd b/completions/useradd
index 4216e71..12c2936 100644
--- a/completions/useradd
+++ b/completions/useradd
@@ -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
;;
diff --git a/completions/userdel b/completions/userdel
index aafd00e..e680026 100644
--- a/completions/userdel
+++ b/completions/userdel
@@ -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
diff --git a/completions/usermod b/completions/usermod
index 8999c6f..0d1f497 100644
--- a/completions/usermod
+++ b/completions/usermod
@@ -24,6 +24,10 @@ _usermod()
COMPREPLY=( $( compgen -P "$prefix" -g -- "${cur##*,}" ) )
return 0
;;
+ -R|--root)
+ _filedir -d
+ return 0
+ ;;
-s|--shell)
_shells
return 0
--
bash-completion
More information about the Bash-completion-commits
mailing list