luac: New completion.

master
Ville Skyttä 2013-03-16 20:49:41 +02:00
parent 99153fb1ef
commit 29f5a4a5f4
4 changed files with 47 additions and 0 deletions

View File

@ -183,6 +183,7 @@ bashcomp_DATA = a2x \
lrzip \
lsof \
lua \
luac \
luseradd \
luserdel \
lvm \

27
completions/luac Normal file
View File

@ -0,0 +1,27 @@
# luac(1) completion -*- shell-script -*-
_luac()
{
local cur prev words cword
_init_completion || return
case $prev in
-v|-)
return
;;
-o)
_filedir
return
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W "$( _parse_help "$1" )" -- "$cur" ) )
return
fi
_filedir lua
} &&
complete -F _luac luac
# ex: ts=4 sw=4 et filetype=sh

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

@ -0,0 +1 @@
assert_source_completions luac

View File

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