d4d2e6d659fcfd3e5eec73f4024a3bb645c76ede

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #1306 from josh-/master

New 'Nanoc' plugin

Diff

 1diff --git a/plugins/nanoc/_nanoc b/plugins/nanoc/_nanoc
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..fde07c3fccc5c8faae39916f8a7dd9e5edc43afe
 4--- /dev/null
 5+++ b/plugins/nanoc/_nanoc
 6@@ -0,0 +1,44 @@
 7+#compdef nanoc
 8+#autoload
 9+
10+# nanoc zsh completion - based on the homebrew zsh completion
11+# requires the 'nanoc' gem to be installed
12+
13+local -a _1st_arguments
14+_1st_arguments=(
15+  'autocompile:start the autocompiler'
16+  'compile:compile items of this site'
17+  'create-item:create an item'
18+  'create-layout:create a layout'
19+  'create-site:create a site'
20+  'deploy:deploy the compiled site'
21+  'help:show help'
22+  'prune:remove files not managed by nanoc from the output directory'
23+  'show-data:show data in this site'
24+  'show-plugins:show all available plugins'
25+  'show-rules:describe the rules for each item'
26+  'update:update the data stored by the data source to a newer version'
27+  'validate-css:validate the site’s CSS'
28+  'validate-html:validate the site’s HTML'
29+  'validate-links:validate links in site'
30+  'view:start the web server that serves static files'
31+  'watch:start the watcher'
32+)
33+
34+local expl
35+local -a pkgs installed_pkgs
36+
37+_arguments \
38+  '(--color)--color[enable color]' \
39+  '(--debug)--debug[enable debugging]' \
40+  '(--help)--help[show the help message and quit]' \
41+  '(--no-color)--no-color[disable color]' \
42+  '(--verbose)--verbose[make nanoc output more detailed]' \
43+  '(--version)--version[show version information and quit]' \
44+  '(--warn)--warn[enable warnings]' \
45+  '*:: :->subcmds' && return 0
46+
47+if (( CURRENT == 1 )); then
48+  _describe -t commands "nanoc subcommand" _1st_arguments
49+  return
50+fi
51diff --git a/plugins/nanoc/nanoc.plugin.zsh b/plugins/nanoc/nanoc.plugin.zsh
52new file mode 100644
53index 0000000000000000000000000000000000000000..5a5064613a999f01d98fea4ccc9f7a384e80460f
54--- /dev/null
55+++ b/plugins/nanoc/nanoc.plugin.zsh
56@@ -0,0 +1,9 @@
57+alias n='nanoc'
58+alias na='nanoc autocompile'
59+alias nco='nanoc compile'
60+alias nci='nanoc create_item'
61+alias ncl='nanoc create_layout'
62+alias ncs='nanoc create_site'
63+alias nd='nanoc deploy'
64+alias nv='nanoc view'
65+alias nw='nanoc watch'