Add javaws completion.

This commit is contained in:
Ville Skyttä 2011-02-06 15:15:20 +02:00
parent 558920aecb
commit cb01d8ea54
4 changed files with 54 additions and 3 deletions

View File

@ -14,9 +14,9 @@ bash-completion (2.x)
[ Ville Skyttä ]
* Activate hping2 completion also for hping and hping3.
* Add badblocks, compgen, crontab, dumpe2fs, e2freefrag, e2label, ether-wake,
filefrag, gendiff, growisofs, iftop, ip (Debian: #600617), kid3, lrzip,
lsof, mktemp, portecle, POSIX sh, sha{,224,256,384,512}sum, sysbench,
tune2fs, xmodmap, and xrdb completions.
filefrag, gendiff, growisofs, iftop, ip (Debian: #600617), javaws, kid3,
lrzip, lsof, mktemp, portecle, POSIX sh, sha{,224,256,384,512}sum,
sysbench, tune2fs, xmodmap, and xrdb completions.
* Add *.gif (Alioth: #312512), *.m2t (Alioth: #312770), *.3gpp, *.3gpp2,
*.awb, and *.iso (Alioth: #311420) to mplayer filename completions.
* Add "short" tarball extensions to unxz, unlzma etc completions.

View File

@ -494,6 +494,36 @@ _jarsigner()
} &&
complete -F _jarsigner jarsigner
have javaws &&
_javaws()
{
COMPREPLY=()
local cur prev
_get_comp_words_by_ref cur prev
case $prev in
-help|-license|-about|-viewer|-arg|-param|-property|-update|-umask)
return 0
;;
-basedir|-codebase)
_filedir -d
return 0
;;
-uninstall|-import)
_filedir jnlp
return 0
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W "$( _parse_help "$1" -help ) " -- "$cur" ) )
return 0
fi
_filedir jnlp
} &&
complete -F _javaws javaws
# Local variables:
# mode: shell-script
# sh-basic-offset: 4

View File

@ -0,0 +1 @@
assert_source_completions javaws

View File

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