lua: New completion.
This commit is contained in:
parent
2f2f1278c7
commit
99153fb1ef
@ -182,6 +182,7 @@ bashcomp_DATA = a2x \
|
|||||||
lpr \
|
lpr \
|
||||||
lrzip \
|
lrzip \
|
||||||
lsof \
|
lsof \
|
||||||
|
lua \
|
||||||
luseradd \
|
luseradd \
|
||||||
luserdel \
|
luserdel \
|
||||||
lvm \
|
lvm \
|
||||||
|
23
completions/lua
Normal file
23
completions/lua
Normal 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
1
test/completion/lua.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions lua
|
18
test/lib/completions/lua.exp
Normal file
18
test/lib/completions/lua.exp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "lua "
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
Loading…
x
Reference in New Issue
Block a user