denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
93.99k stars 5.23k forks source link

Completions for 'deno test' print errors in zsh #13702

Open rherrmann opened 2 years ago

rherrmann commented 2 years ago

I'm using Oh-My-Zsh and installed Deno with Hombrew. It puts completions in /usr/local/share/zsh/site-functions.

While completions work fine in general, typing deno test <TAB> prints this:

_arguments:comparguments:325: doubled rest argument definition: *::script_arg -- Script arg:
_arguments:comparguments:325: doubled rest argument definition: *::script_arg -- Script arg:
_arguments:comparguments:325: doubled rest argument definition: *::script_arg -- Script arg:

Observed with version 1.18.2 and 1.19.

crowlKats commented 2 years ago

Ref https://github.com/clap-rs/clap/issues/3022

mcornella commented 2 years ago

This happens in vanilla zsh. Using Oh My Zsh is irrelevant.

jsejcksn commented 2 years ago

This happens in vanilla zsh. Using Oh My Zsh is irrelevant.

@rherrmann This is accurate. The issue title can be changed to reflect the larger scope: zsh in general.

jespertheend commented 2 years ago

Seems like a workaround for now is to manually remove the *::script_arg part in your completions file.

'--quiet[Suppress diagnostic output]' \
'*::files -- List of file names to run:_files' \
- '*::script_arg -- Script arg:_files' \

You can also change it to how it was in 1.17.3 and simply remove the asterisks before *::files and *::script_arg.

sant123 commented 2 years ago

I'm currently using Oh My Zsh in Deno v1.22.0 and it prints the errors:

image

tohsaka888 commented 1 year ago

same error occured in arch linux, any solution?

crowlKats commented 1 year ago

@tohsaka888 what Deno version are you on?

tohsaka888 commented 1 year ago

@crowlKats image

sant123 commented 1 year ago

I'm having the same issue.

deno 1.29.2 (release, x86_64-unknown-linux-gnu) v8 10.9.194.5 typescript 4.9.4 fedora 36

zuisong commented 1 year ago

Seems like a workaround for now is to manually remove the *::script_arg part in your completions file.

'--quiet[Suppress diagnostic output]' \
'*::files -- List of file names to run:_files' \
- '*::script_arg -- Script arg:_files' \

You can also change it to how it was in 1.17.3 and simply remove the asterisks before *::files and *::script_arg.

It works for me , tks

deno 1.29.2 (release, aarch64-apple-darwin) v8 10.9.194.5 typescript 4.9.4