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