luseradd,lusermod,luserdel: New completions.
This commit is contained in:
parent
1d75b671a0
commit
08203f7743
1
completions/.gitignore
vendored
1
completions/.gitignore
vendored
@ -71,6 +71,7 @@ ldapmodrdn
|
||||
ldappasswd
|
||||
ldapwhoami
|
||||
lintian-info
|
||||
lusermod
|
||||
lvchange
|
||||
lvcreate
|
||||
lvdisplay
|
||||
|
@ -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 \
|
||||
|
40
completions/luseradd
Normal file
40
completions/luseradd
Normal file
@ -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
|
23
completions/luserdel
Normal file
23
completions/luserdel
Normal file
@ -0,0 +1,23 @@
|
||||
# luserdel(1) completion -*- shell-script -*-
|
||||
|
||||
_luserdel()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
case $prev in
|
||||
-\?|--help|--usage)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||
return
|
||||
fi
|
||||
|
||||
COMPREPLY=( $( compgen -u -- "$cur" ) )
|
||||
} &&
|
||||
complete -F _luserdel luserdel
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
1
test/completion/luseradd.exp
Normal file
1
test/completion/luseradd.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions luseradd
|
1
test/completion/luserdel.exp
Normal file
1
test/completion/luserdel.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions luserdel
|
1
test/completion/lusermod.exp
Normal file
1
test/completion/lusermod.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions lusermod
|
18
test/lib/completions/luseradd.exp
Normal file
18
test/lib/completions/luseradd.exp
Normal file
@ -0,0 +1,18 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "luseradd -"
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
18
test/lib/completions/luserdel.exp
Normal file
18
test/lib/completions/luserdel.exp
Normal file
@ -0,0 +1,18 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "luserdel "
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
18
test/lib/completions/lusermod.exp
Normal file
18
test/lib/completions/lusermod.exp
Normal file
@ -0,0 +1,18 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "lusermod "
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
Loading…
x
Reference in New Issue
Block a user