1
0
mirror of https://github.com/Adorable-Catgirl/LuaComp.git synced 2024-11-15 14:38:05 +11:00
LuaComp/completion/zsh/_luacomp

30 lines
800 B
Plaintext
Raw Normal View History

2019-12-16 04:56:50 +11:00
#compdef luacomp
2019-12-16 05:01:16 +11:00
_luacomp_postproc() {
procs=( ${(@f)"$(luacomp --post-processors)"} )
compadd -a procs
}
2019-12-16 04:56:50 +11:00
_luacomp() {
local -a options=(
{-h,--help}"[Show this help message and exit]"
{-O,--output}"[Output file]: :_files"
2019-12-16 05:01:16 +11:00
{-m,--minifier}"[Sets the postprocessor]: :_luacomp_postproc"
{-x,--executable}"[Makes the script an executable]: :_path_commands"
2019-12-16 04:56:50 +11:00
"--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