29b66b85c83c01d4dd90d9b9a9a0af41fa556d25

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

Message

Merge pull request #1412 from jdavis/coffee_plugin

Added a CoffeeScript plugin.

Diff

 1diff --git a/plugins/coffee/_coffee b/plugins/coffee/_coffee
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..5c8eb9a084050bf740c12992af8b609cb99a104c
 4--- /dev/null
 5+++ b/plugins/coffee/_coffee
 6@@ -0,0 +1,71 @@
 7+#compdef coffee
 8+# ------------------------------------------------------------------------------
 9+# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
10+# All rights reserved.
11+#
12+# Redistribution and use in source and binary forms, with or without
13+# modification, are permitted provided that the following conditions are met:
14+#     * Redistributions of source code must retain the above copyright
15+#       notice, this list of conditions and the following disclaimer.
16+#     * Redistributions in binary form must reproduce the above copyright
17+#       notice, this list of conditions and the following disclaimer in the
18+#       documentation and/or other materials provided with the distribution.
19+#     * Neither the name of the zsh-users nor the
20+#       names of its contributors may be used to endorse or promote products
21+#       derived from this software without specific prior written permission.
22+#
23+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26+# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
27+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33+# ------------------------------------------------------------------------------
34+# Description
35+# -----------
36+#
37+#  Completion script for Coffee.js v0.6.11 (http://coffeejs.org)
38+#
39+# ------------------------------------------------------------------------------
40+# Authors
41+# -------
42+#
43+#  * Mario Fernandez (https://github.com/sirech)
44+#
45+# ------------------------------------------------------------------------------
46+
47+local curcontext="$curcontext" state line ret=1
48+typeset -A opt_args
49+
50+_arguments -C \
51+  '(- *)'{-h,--help}'[display this help message]' \
52+  '(- *)'{-v,--version}'[display the version number]' \
53+  '(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \
54+  '(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \
55+  '(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \
56+  '(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]:Destination JS file:_files -g "*.js"' \
57+  '(-l --lint)'{-l,--lint}'[pipe the compiled JavaScript through JavaScript Lint]' \
58+  '(--nodejs)--nodejs[pass options directly to the "node" binary]' \
59+  '(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \
60+  '(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]:Output Directory:_files -/' \
61+  '(-n -t -p)'{-n,--nodes}'[print out the parse tree that the parser produces]' \
62+  '(-n -t -p)'{-p,--print}'[print out the compiled JavaScript]' \
63+  '(-n -t -p)'{-t,--tokens}'[print out the tokens that the lexer/rewriter produce]' \
64+  '(-r --require)'{-r,--require}'[require a library before executing your script]:library' \
65+  '(-s --stdio)'{-s,--stdio}'[listen for and compile scripts over stdio]' \
66+  '(-w --watch)'{-w,--watch}'[watch scripts for changes and rerun commands]' \
67+  '*:script or directory:_files' && ret=0
68+
69+return ret
70+
71+# Local Variables:
72+# mode: Shell-Script
73+# sh-indentation: 2
74+# indent-tabs-mode: nil
75+# sh-basic-offset: 2
76+# End:
77+# vim: ft=zsh sw=2 ts=2 et