[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-84-g08203f7
Ville Skyttä
ville.skytta at iki.fi
Fri Dec 28 12:10:15 UTC 2012
The following commit has been merged in the master branch:
commit 08203f7743ea41e7f10a891c130a18be713bd494
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Fri Dec 28 14:07:34 2012 +0200
luseradd,lusermod,luserdel: New completions.
diff --git a/completions/.gitignore b/completions/.gitignore
index 9009b68..7d80a20 100644
--- a/completions/.gitignore
+++ b/completions/.gitignore
@@ -71,6 +71,7 @@ ldapmodrdn
ldappasswd
ldapwhoami
lintian-info
+lusermod
lvchange
lvcreate
lvdisplay
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 2efe322..20aaa32 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -179,6 +179,8 @@ bashcomp_DATA = a2x \
lpr \
lrzip \
lsof \
+ luseradd \
+ luserdel \
lvm \
lzip \
lzma \
@@ -441,6 +443,7 @@ CLEANFILES = \
ldappasswd \
ldapwhoami \
lintian-info \
+ lusermod \
lvchange \
lvcreate \
lvdisplay \
@@ -684,6 +687,10 @@ symlinks: $(targetdir) $(DATA)
rm -f $(targetdir)/$$file && \
$(LN_S) lintian $(targetdir)/$$file ; \
done
+ for file in lusermod ; do \
+ rm -f $(targetdir)/$$file && \
+ $(LN_S) luseradd $(targetdir)/$$file ; \
+ done
for file in lvmdiskscan pvscan pvs pvdisplay pvchange pvcreate pvmove \
pvremove vgscan vgs vgdisplay vgchange vgremove vgrename \
vgreduce vgextend vgimport vgexport vgck vgconvert vgcreate \
diff --git a/completions/luseradd b/completions/luseradd
new file mode 100644
index 0000000..e5b00c3
--- /dev/null
+++ b/completions/luseradd
@@ -0,0 +1,40 @@
+# luseradd(1) and lusermod(1) completion -*- shell-script -*-
+
+_luseradd()
+{
+ local cur prev words cword split
+ _init_completion -s || return
+
+ case $prev in
+ -\?|--help|--usage|-c|--gecos|-u|--uid|-l|--login|-P|--plainpassword|\
+ -p|--password|--commonname|--givenname|--surname|--roomnumber|\
+ --telephonenumber|--homephone)
+ return
+ ;;
+ -d|--directory|-k|--skeleton)
+ _filedir -d
+ return
+ ;;
+ -s|--shell)
+ _shells
+ return
+ ;;
+ -g|--gid)
+ _gids
+ return
+ ;;
+ esac
+
+ $split && return
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ [[ $COMPREPLY == *= ]] && compopt -o nospace
+ return
+ fi
+
+ [[ ${1##*/} == luseradd ]] || COMPREPLY=( $( compgen -u -- "$cur" ) )
+} &&
+complete -F _luseradd luseradd lusermod
+
+# ex: ts=4 sw=4 et filetype=sh
diff --git a/completions/userdel b/completions/luserdel
similarity index 60%
copy from completions/userdel
copy to completions/luserdel
index 090203a..05faaac 100644
--- a/completions/userdel
+++ b/completions/luserdel
@@ -1,27 +1,23 @@
-# userdel(8) completion -*- shell-script -*-
+# luserdel(1) completion -*- shell-script -*-
-_userdel()
+_luserdel()
{
local cur prev words cword
_init_completion || return
case $prev in
- -h|--help)
- return
- ;;
- -R|--root)
- _filedir -d
+ -\?|--help|--usage)
return
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
- return 0
+ return
fi
COMPREPLY=( $( compgen -u -- "$cur" ) )
} &&
-complete -F _userdel userdel
+complete -F _luserdel luserdel
# ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/luseradd.exp b/test/completion/luseradd.exp
new file mode 100644
index 0000000..69b10cf
--- /dev/null
+++ b/test/completion/luseradd.exp
@@ -0,0 +1 @@
+assert_source_completions luseradd
diff --git a/test/completion/luserdel.exp b/test/completion/luserdel.exp
new file mode 100644
index 0000000..289a4c3
--- /dev/null
+++ b/test/completion/luserdel.exp
@@ -0,0 +1 @@
+assert_source_completions luserdel
diff --git a/test/completion/lusermod.exp b/test/completion/lusermod.exp
new file mode 100644
index 0000000..9ca4cec
--- /dev/null
+++ b/test/completion/lusermod.exp
@@ -0,0 +1 @@
+assert_source_completions lusermod
diff --git a/test/lib/completions/abook.exp b/test/lib/completions/luseradd.exp
similarity index 77%
copy from test/lib/completions/abook.exp
copy to test/lib/completions/luseradd.exp
index 43f6272..744314a 100644
--- a/test/lib/completions/abook.exp
+++ b/test/lib/completions/luseradd.exp
@@ -11,9 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "abook "
-
-
+assert_complete_any "luseradd -"
sync_after_int
diff --git a/test/lib/completions/abook.exp b/test/lib/completions/luserdel.exp
similarity index 78%
copy from test/lib/completions/abook.exp
copy to test/lib/completions/luserdel.exp
index 43f6272..70d1166 100644
--- a/test/lib/completions/abook.exp
+++ b/test/lib/completions/luserdel.exp
@@ -11,9 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "abook "
-
-
+assert_complete_any "luserdel "
sync_after_int
diff --git a/test/lib/completions/abook.exp b/test/lib/completions/lusermod.exp
similarity index 78%
copy from test/lib/completions/abook.exp
copy to test/lib/completions/lusermod.exp
index 43f6272..f96293e 100644
--- a/test/lib/completions/abook.exp
+++ b/test/lib/completions/lusermod.exp
@@ -11,9 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "abook "
-
-
+assert_complete_any "lusermod "
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list