aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2022-11-18 10:55:27 +0900
committerShohei YOSHIDA <syohex@gmail.com>2022-11-18 10:55:27 +0900
commitb920d83b9aab57a72d65bcaf32b518fb0b184e7b (patch)
tree39d26008210e4b2cfb9ef46cdb562783458d3d98 /src
parentMerge pull request #932 from zsh-users/update-lunchy (diff)
downloadzsh-completions-b920d83b9aab57a72d65bcaf32b518fb0b184e7b.tar
zsh-completions-b920d83b9aab57a72d65bcaf32b518fb0b184e7b.tar.gz
zsh-completions-b920d83b9aab57a72d65bcaf32b518fb0b184e7b.tar.bz2
zsh-completions-b920d83b9aab57a72d65bcaf32b518fb0b184e7b.tar.lz
zsh-completions-b920d83b9aab57a72d65bcaf32b518fb0b184e7b.tar.xz
zsh-completions-b920d83b9aab57a72d65bcaf32b518fb0b184e7b.tar.zst
zsh-completions-b920d83b9aab57a72d65bcaf32b518fb0b184e7b.zip
Update coffee completion
Diffstat (limited to 'src')
-rw-r--r--src/_coffee43
1 files changed, 19 insertions, 24 deletions
diff --git a/src/_coffee b/src/_coffee
index 10b6b81..ebe36e6 100644
--- a/src/_coffee
+++ b/src/_coffee
@@ -1,6 +1,6 @@
#compdef coffee
# ------------------------------------------------------------------------------
-# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
+# Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,7 +28,7 @@
# Description
# -----------
#
-# Completion script for Coffee.js v0.6.11 (http://coffeejs.org)
+# Completion script for Coffee.js v2.7.0 (https://coffeescript.org/)
#
# ------------------------------------------------------------------------------
# Authors
@@ -39,34 +39,29 @@
#
# ------------------------------------------------------------------------------
-local curcontext="$curcontext" state line ret=1 version opts first second third
+local curcontext="$curcontext" state line ret=1
typeset -A opt_args
-version=(${(f)"$(_call_program version $words[1] --version)"})
-version=${${(z)${version[1]}}[3]}
-first=$(echo $version|cut -d '.' -f 1)
-second=$(echo $version|cut -d '.' -f 2)
-third=$(echo $version|cut -d '.' -f 3)
-if (( $first < 2 )) && (( $second < 7 )) && (( $third < 3 ));then
- opts+=('(-l --lint)'{-l,--lint}'[pipe the compiled JavaScript through JavaScript Lint]'
- '(-r --require)'{-r,--require}'[require a library before executing your script]:library')
-fi
-
-_arguments -C \
- '(- *)'{-h,--help}'[display this help message]' \
- '(- *)'{-v,--version}'[display the version number]' \
- $opts \
+_arguments -s -S \
+ '--ast[generate an abstract syntax tree of nodes]' \
'(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \
+ '(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \
'(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \
+ '(- *)'{-h,--help}'[display this help message]' \
'(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \
- '(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]:Destination JS file:_files -g "*.js"' \
- '(--nodejs)--nodejs[pass options directly to the "node" binary]' \
- '(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \
- '(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]:Output Directory:_files -/' \
- '(-n -t -p)'{-n,--nodes}'[print out the parse tree that the parser produces]' \
- '(-n -t -p)'{-p,--print}'[print out the compiled JavaScript]' \
- '(-n -t -p)'{-t,--tokens}'[print out the tokens that the lexer/rewriter produce]' \
+ '(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]: :_files -g "*.coffee"' \
+ '(-l --literate)'{-l,--literate}'[treat stdio as literate style coffeescript]' \
+ '(-m --map)'{-m,--map}'[generate source map and save as .js.map files]' \
+ '(-M --inline-map)'{-M,--inline-map}'[generate source map and include it directly in output]' \
+ '(-n --nodes)'{-n,--nodes}'[print out the parse tree that the parser produces]' \
+ '--nodejs[pass options directly to the "node" binary]' \
+ '(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]: :_files' \
+ '(-p --print --tokens)'{-p,--print}'[print out the compiled JavaScript]' \
+ '(-r --require)'\*{-r,--require}'[require the given module before eval or REPL]:module' \
'(-s --stdio)'{-s,--stdio}'[listen for and compile scripts over stdio]' \
+ '(-t --transpile)'{-t,--transpile}'[pipe generated JavaScript through Babel]' \
+ '(-p --print --tokens)--tokens[print out the tokens that the lexer/rewriter produce]' \
+ '(- *)'{-v,--version}'[display the version number]' \
'(-w --watch)'{-w,--watch}'[watch scripts for changes and rerun commands]' \
'*:script or directory:_files' && ret=0