ldapvi: Use _parse_help, add basic test case.
This commit is contained in:
parent
fbf0bd3059
commit
b7f1f74ba0
@ -46,18 +46,7 @@ _ldapvi()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--discover --out --in --delete \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--rename -h --host -D --user -w --password --bind \
|
|
||||||
--bind-dialog -I --sasl-interactive --bind-dialog -O \
|
|
||||||
--sasl-secprops -Q --sasl-quiet -R --sasl-realm -U \
|
|
||||||
--sasl-authcid -X --sasl-authzid -Y --sasl-mech -b \
|
|
||||||
--base -s --scope -S --sort --add -o --class --config \
|
|
||||||
-c --continue --deleteoldrdn -a --deref -d --discover \
|
|
||||||
-A --empty --ncoding -H --help --ldap-conf -m --may -M \
|
|
||||||
--managedsait --noquestions -! --noninteractive -q \
|
|
||||||
--quiet -R --read -Z --starttls --tls -v --verbose \
|
|
||||||
--ldapsearch --ldapmodify --ldapdelete --ldapmoddn' \
|
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
complete -F _ldapvi ldapvi
|
complete -F _ldapvi ldapvi
|
||||||
|
1
test/completion/ldapvi.exp
Normal file
1
test/completion/ldapvi.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions ldapvi
|
20
test/lib/completions/ldapvi.exp
Normal file
20
test/lib/completions/ldapvi.exp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "ldapvi -"
|
||||||
|
|
||||||
|
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
Loading…
x
Reference in New Issue
Block a user