aboutsummaryrefslogtreecommitdiffstats
path: root/src/_nanoc
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2023-08-27 20:43:14 +0900
committerShohei YOSHIDA <syohex@gmail.com>2023-08-27 20:43:14 +0900
commit760324021989b3c5fc8e1af4e453af2cae50083f (patch)
treee8a558e96cb0d808ebd0a52e3e63b843cddc3b4c /src/_nanoc
parentMerge pull request #1030 from zsh-users/refactor_fvm (diff)
downloadzsh-completions-760324021989b3c5fc8e1af4e453af2cae50083f.tar
zsh-completions-760324021989b3c5fc8e1af4e453af2cae50083f.tar.gz
zsh-completions-760324021989b3c5fc8e1af4e453af2cae50083f.tar.bz2
zsh-completions-760324021989b3c5fc8e1af4e453af2cae50083f.tar.lz
zsh-completions-760324021989b3c5fc8e1af4e453af2cae50083f.tar.xz
zsh-completions-760324021989b3c5fc8e1af4e453af2cae50083f.tar.zst
zsh-completions-760324021989b3c5fc8e1af4e453af2cae50083f.zip
Update nanoc completion and cleanup its code
Diffstat (limited to 'src/_nanoc')
-rw-r--r--src/_nanoc74
1 files changed, 31 insertions, 43 deletions
diff --git a/src/_nanoc b/src/_nanoc
index d0a334d..c3f0bb0 100644
--- a/src/_nanoc
+++ b/src/_nanoc
@@ -23,7 +23,7 @@
# Description
# -----------
#
-# Completion script for nanoc (https://nanoc.app/)
+# Completion script for nanoc 4.12.16 (https://nanoc.app/)
#
# ------------------------------------------------------------------------------
# Authors
@@ -36,24 +36,26 @@
#
# ------------------------------------------------------------------------------
-local ret=1 state
+local ret=1
+local context state line
+local curcontext="$curcontext"
local -a common_ops
common_ops=(
{-C,--no-color}"[disable color]"
{-V,--verbose}"[make output more detailed]"
{-d,--debug}"[enable debugging]"
- {-e,--env=}"[set environment]"
- {-h,--help}"[show the help message and quit]"
+ {-e,--env=}"[set environment]:envvar:_parameters -g '*export*' -qS="
+ '(- *)'{-h,--help}"[show the help message and quit]"
{-l,--color}"[enable color]"
- {-v,--version}"[show version information and quit]"
+ '(- *)'{-v,--version}"[show version information and quit]"
{-w,--warn}"[enable warnings]"
)
typeset -A opt_args
-_arguments \
- ':subcommand:->subcommand' \
+_arguments -C \
$common_ops \
+ '1:subcommand:->subcommand' \
'*::options:->options' && ret=0
case $state in
@@ -74,83 +76,61 @@ case $state in
)
_describe -t subcommands 'nanoc subcommand' subcommands && ret=0
- ;;
-
+ ;;
options)
local -a args
args=(
$common_ops
)
- local -a help
- help=(
- "--help[Display help information]"
- )
-
case $words[1] in
check)
args=(
{-L,--list}"[list all checks]"
{-a,--all}"[run all checks]"
)
- ;;
-
+ ;;
compile)
args=(
+ {-W,--watch}'[watch for changes and recompile when needed]'
"--diff[generate diff]"
)
- ;;
-
+ ;;
create-site)
args=(
"--force[force creation of new site]"
)
- ;;
-
+ ;;
deploy)
args=(
{-C,--no-check}"[do not run the issue checks marked for deployment]"
{-D,--list-deployers}"[list available deployers]"
{-L,--list}"[list available locations to deploy to]"
{-n,--dry-run}"[show what would be deployed]"
- {-t,--target=}"[specify the location to deploy to (default:\`default\`)]"
+ {-t,--target=}"[specify the location to deploy to (default:\`default\`)]:target"
)
- ;;
-
+ ;;
prune)
args=(
{-n,--dry-run}"[print files to be deleted instead of actually deleting them]"
{-y,--yes}"[confirm deletion]"
)
- ;;
-
+ ;;
shell)
args=(
{-p,--preprocess}"[run preprocessor]"
)
- ;;
-
- show-data)
+ ;;
+ show-data|show-plugins|show-rules)
args=(
)
- ;;
-
- show-plugins)
- args=(
- )
- ;;
-
- show-rules)
- args=(
- )
- ;;
-
+ ;;
view)
args=(
- {-H,--handler=}"[specify the handler to use(webrick/mongrel/...)]"
+ {-H,--handler=}"[specify the handler to use(webrick/mongrel/...)]:handler"
{-L,--live-reload}"[reload on changes]"
- {-o,--host=}"[specify the host to listen on(default: 127.0.0.1)]"
- {-p,--port=}"[specify the port to listen on(default: 3000)]"
+ {-o,--host=}"[specify the host to listen on(default: 127.0.0.1)]:host"
+ {-p,--port=}"[specify the port to listen on(default: 3000)]:port"
)
;;
esac
@@ -160,3 +140,11 @@ case $state in
esac
return ret
+
+# Local Variables:
+# mode: Shell-Script
+# sh-indentation: 2
+# indent-tabs-mode: nil
+# sh-basic-offset: 2
+# End:
+# vim: ft=zsh sw=2 ts=2 et