zola/completions/_gutenberg

109 lines
3.1 KiB
Plaintext
Raw Permalink Normal View History

2017-07-15 04:24:31 +00:00
#compdef gutenberg
_gutenberg() {
typeset -A opt_args
local ret=1
local context curcontext="$curcontext" state line
_arguments -s -S -C \
2017-10-20 08:44:14 +00:00
'-c[Path to a config file other than config.toml]' \
'--config[Path to a config file other than config.toml]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
2017-07-15 04:24:31 +00:00
"1:: :_gutenberg_commands" \
2017-10-20 08:44:14 +00:00
"*:: :->gutenberg" \
2017-07-15 04:24:31 +00:00
&& ret=0
case $state in
2017-10-20 08:44:14 +00:00
(gutenberg)
2017-07-15 04:24:31 +00:00
curcontext="${curcontext%:*:*}:gutenberg-command-$words[1]:"
case $line[1] in
(init)
_arguments -s -S -C \
2017-10-20 08:44:14 +00:00
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
2017-07-15 04:24:31 +00:00
"1:: :_gutenberg__init_commands" \
&& ret=0
;;
(build)
_arguments -s -S -C \
2017-10-20 08:44:14 +00:00
'-u+[Force the base URL to be that value (default to the one in config.toml)]' \
'--base-url+[Force the base URL to be that value (default to the one in config.toml)]' \
'-o+[Outputs the generated site in the given path]' \
'--output-dir+[Outputs the generated site in the given path]' \
2017-10-20 08:44:14 +00:00
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
2017-07-15 04:24:31 +00:00
&& ret=0
;;
(serve)
_arguments -s -S -C \
2017-10-20 08:44:14 +00:00
'-i+[Interface to bind on]' \
'--interface+[Interface to bind on]' \
'-p+[Which port to use]' \
'--port+[Which port to use]' \
'-o+[Outputs the generated site in the given path]' \
'--output-dir+[Outputs the generated site in the given path]' \
2017-10-20 08:44:14 +00:00
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
2017-07-15 04:24:31 +00:00
&& ret=0
;;
(help)
_arguments -s -S -C \
2017-10-20 08:44:14 +00:00
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
2017-07-15 04:24:31 +00:00
&& ret=0
;;
esac
;;
esac
}
(( $+functions[_gutenberg_commands] )) ||
_gutenberg_commands() {
local commands; commands=(
"init:Create a new Gutenberg project" \
"build:Builds the site" \
"serve:Serve the site. Rebuild and reload on change automatically" \
"help:Prints this message or the help of the given subcommand(s)" \
)
_describe -t commands 'gutenberg commands' commands "$@"
}
(( $+functions[_gutenberg__build_commands] )) ||
_gutenberg__build_commands() {
local commands; commands=(
)
_describe -t commands 'gutenberg build commands' commands "$@"
}
(( $+functions[_gutenberg__help_commands] )) ||
_gutenberg__help_commands() {
local commands; commands=(
)
_describe -t commands 'gutenberg help commands' commands "$@"
}
(( $+functions[_gutenberg__init_commands] )) ||
_gutenberg__init_commands() {
local commands; commands=(
2017-10-20 08:44:14 +00:00
"NAME:Name of the project. Will create a new directory with that name in the current directory" \
2017-07-15 04:24:31 +00:00
)
_describe -t commands 'gutenberg init commands' commands "$@"
}
(( $+functions[_gutenberg__serve_commands] )) ||
_gutenberg__serve_commands() {
local commands; commands=(
2017-10-20 08:44:14 +00:00
2017-07-15 04:24:31 +00:00
)
_describe -t commands 'gutenberg serve commands' commands "$@"
}
_gutenberg "$@"