diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2022-04-02 13:24:35 -0500 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2022-04-02 13:24:35 -0500 |
commit | 2023d3ab658fe8ed4dd4ca33cd5974ab8f0ad945 (patch) | |
tree | 99add95300f57806b89bd885a5f5322ce9f9ac1a /plugins/coffee/_coffee | |
parent | cae9a2b797649379e865e6bd73bc67e294e4ac77 (diff) | |
parent | 53863e7b3ff0c2e2816e90dab3d870adebdf49c7 (diff) | |
download | zsh-2023d3ab658fe8ed4dd4ca33cd5974ab8f0ad945.tar.gz zsh-2023d3ab658fe8ed4dd4ca33cd5974ab8f0ad945.tar.bz2 zsh-2023d3ab658fe8ed4dd4ca33cd5974ab8f0ad945.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/coffee/_coffee')
-rw-r--r-- | plugins/coffee/_coffee | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/coffee/_coffee b/plugins/coffee/_coffee index 5e52b30e6..e2814f7ba 100644 --- a/plugins/coffee/_coffee +++ b/plugins/coffee/_coffee @@ -39,14 +39,14 @@ # # ------------------------------------------------------------------------------ -local curcontext="$curcontext" state line ret=1 version opts first second third +local curcontext="$curcontext" state line ret=1 version +local -a opts typeset -A opt_args -version=(${(f)"$(_call_program version $words[1] --version)"}) +version=(${(f)"$(_call_program version $words[1] --version)"}) || return ret 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 + +autoload -Uz is-at-least +if ! is-at-least 1.6.3 "$version"; 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 |