diff options
author | Marc Cornellà <marc.cornella@live.com> | 2019-10-24 17:57:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-24 17:57:01 +0200 |
commit | cad48e38bfbfa6e3e0096caddf330d6fc8f1ffb9 (patch) | |
tree | 2b07ec259bbd2b1a4919245669900a87fa87a03b /plugins/nanoc/_nanoc | |
parent | 225425fe091ca052997833279ccc08643818c24a (diff) | |
parent | 40df67bc3b9b51caa24df5d220487043040d1f9a (diff) | |
download | zsh-cad48e38bfbfa6e3e0096caddf330d6fc8f1ffb9.tar.gz zsh-cad48e38bfbfa6e3e0096caddf330d6fc8f1ffb9.tar.bz2 zsh-cad48e38bfbfa6e3e0096caddf330d6fc8f1ffb9.zip |
Merge branch 'master' into fabric_task_description
Diffstat (limited to 'plugins/nanoc/_nanoc')
-rw-r--r-- | plugins/nanoc/_nanoc | 68 |
1 files changed, 58 insertions, 10 deletions
diff --git a/plugins/nanoc/_nanoc b/plugins/nanoc/_nanoc index fde07c3fc..a6a4792ad 100644 --- a/plugins/nanoc/_nanoc +++ b/plugins/nanoc/_nanoc @@ -1,28 +1,21 @@ #compdef nanoc #autoload -# nanoc zsh completion - based on the homebrew zsh completion # requires the 'nanoc' gem to be installed local -a _1st_arguments _1st_arguments=( - 'autocompile:start the autocompiler' + 'check:run issue checks' 'compile:compile items of this site' - 'create-item:create an item' - 'create-layout:create a layout' 'create-site:create a site' 'deploy:deploy the compiled site' 'help:show help' 'prune:remove files not managed by nanoc from the output directory' + 'shell:open a shell on the Nanoc environment' 'show-data:show data in this site' 'show-plugins:show all available plugins' 'show-rules:describe the rules for each item' - 'update:update the data stored by the data source to a newer version' - 'validate-css:validate the site’s CSS' - 'validate-html:validate the site’s HTML' - 'validate-links:validate links in site' 'view:start the web server that serves static files' - 'watch:start the watcher' ) local expl @@ -31,13 +24,68 @@ local -a pkgs installed_pkgs _arguments \ '(--color)--color[enable color]' \ '(--debug)--debug[enable debugging]' \ + '(--env)--env[set environment]' \ '(--help)--help[show the help message and quit]' \ '(--no-color)--no-color[disable color]' \ - '(--verbose)--verbose[make nanoc output more detailed]' \ + '(--verbose)--verbose[make output more detailed]' \ '(--version)--version[show version information and quit]' \ '(--warn)--warn[enable warnings]' \ '*:: :->subcmds' && return 0 +case "$state" in + subcmds) + case $words[1] in + check) + _arguments \ + '(--preprocess)--preprocess[run preprocessor]' + ;; + + compile) + _arguments \ + '(--diff)--diff[generate diff]' + ;; + + compile) + _arguments \ + '(--diff)--diff[generate diff]' + ;; + + create-site) + _arguments \ + '(--force)--force[force creation of new site]' + ;; + + deploy) + _arguments \ + '(--target)--target[specify the location to deploy to (default: `default`)]' \ + '(--no-check)--no-check[do not run the issue checks marked for deployment]' \ + '(--list)--list[list available locations to deploy to]' \ + '(--list-deployers)--list-deployers[list available deployers]' \ + '(--dry-run)--dry-run[show what would be deployed]' + ;; + + prune) + _arguments \ + '(--yes)--yes[confirm deletion]' \ + '(--dry-run)--dry-run[print files to be deleted instead of actually deleting them]' + ;; + + shell) + _arguments \ + '(--preprocess)--preprocess[run preprocessor]' + ;; + + view) + _arguments \ + '(--handler)--handler[specify the handler to use (webrick/mongrel/...)]' \ + '(--host)--host[specify the host to listen on (default: 127.0.0.1)]' \ + '(--port)--port[specify the port to listen on (default: 3000]' \ + '(--live-reload)--live-reload[reload on changes]' + ;; + esac + ;; +esac + if (( CURRENT == 1 )); then _describe -t commands "nanoc subcommand" _1st_arguments return |