lua: New completion.

master
Ville Skyttä 2013-03-16 20:48:15 +02:00
parent 2f2f1278c7
commit 99153fb1ef
4 changed files with 43 additions and 0 deletions

View File

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

23
completions/lua Normal file
View File

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

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

@ -0,0 +1 @@
assert_source_completions lua

View File

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