summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2012-12-28 13:46:24 +0200
committerVille Skyttä <ville.skytta@iki.fi>2012-12-28 13:46:24 +0200
commit5c8279b818560146176372752c4a87c588207674 (patch)
tree6b80cd2e90873b7717a68b162b4521b4d88c3d64
parent41a37d767940af7928282874618e3dc60549de54 (diff)
downloadbash-completion-5c8279b818560146176372752c4a87c588207674.tar.gz
useradd,userdel,usermod: Add -R/--root arg completion.
-rw-r--r--completions/useradd2
-rw-r--r--completions/userdel7
-rw-r--r--completions/usermod4
3 files changed, 12 insertions, 1 deletions
diff --git a/completions/useradd b/completions/useradd
index 4216e71d..12c29365 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 aafd00eb..e6800260 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 8999c6fe..0d1f497b 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