idn: New completion.

This commit is contained in:
Ville Skyttä 2011-08-23 20:26:06 +03:00
parent bff8677599
commit bae99345fd
4 changed files with 54 additions and 0 deletions

View File

@ -67,6 +67,7 @@ bashcomp_DATA = abook \
hping2 \
htpasswd \
iconv \
idn \
iftop \
ifupdown \
imagemagick \

32
completions/idn Normal file
View File

@ -0,0 +1,32 @@
have idn || return
_idn()
{
local cur prev words cword split
_init_completion -s || return
case $prev in
-h|--help|-V|--version)
return
;;
-p|--profile)
COMPREPLY=( $( compgen -W 'Nameprep iSCSI Nodeprep Resourceprep
trace SASLprep' -- "$cur" ) )
return
;;
esac
if ! $split && [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
fi
} &&
complete -F _idn idn
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh

1
test/completion/idn.exp Normal file
View File

@ -0,0 +1 @@
assert_source_completions idn

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "idn -"
sync_after_int
teardown