luac: New completion.
parent
99153fb1ef
commit
29f5a4a5f4
|
@ -183,6 +183,7 @@ bashcomp_DATA = a2x \
|
|||
lrzip \
|
||||
lsof \
|
||||
lua \
|
||||
luac \
|
||||
luseradd \
|
||||
luserdel \
|
||||
lvm \
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
assert_source_completions luac
|
|
@ -0,0 +1,18 @@
|
|||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_complete_any "luac "
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
Loading…
Reference in New Issue