mirror of
https://github.com/Adorable-Catgirl/LuaComp.git
synced 2024-11-23 10:28:06 +11:00
30 lines
800 B
Plaintext
30 lines
800 B
Plaintext
#compdef luacomp
|
|
|
|
_luacomp_postproc() {
|
|
procs=( ${(@f)"$(luacomp --post-processors)"} )
|
|
compadd -a procs
|
|
}
|
|
|
|
_luacomp() {
|
|
local -a options=(
|
|
{-h,--help}"[Show this help message and exit]"
|
|
{-O,--output}"[Output file]: :_files"
|
|
{-m,--minifier}"[Sets the postprocessor]: :_luacomp_postproc"
|
|
{-x,--executable}"[Makes the script an executable]: :_path_commands"
|
|
"--generator-code[Outputs only the code from the generator]"
|
|
"--verbose[Verbose output]"
|
|
"--post-processors[Lists postprocessors]"
|
|
"--directives[Lists directives]"
|
|
{-v,--version}"[Prints the version and exits]"
|
|
"--completion[Output a shell completion script for the specified shell]: :(bash zsh fish)"
|
|
)
|
|
_arguments -s -S \
|
|
$options \
|
|
": :_files" \
|
|
&& return 0
|
|
|
|
return 1
|
|
}
|
|
|
|
_luacomp
|