deno: Completions are broken since 1.18 in zsh

Hi! Completions in zsh doesn’t work in the following way since 1.18.0 (1.17.3 works):

  • It completes the commands correctly (such as run, build, etc)
  • It doesn’t complete the directories: if you write deno run and <TAB> it doesn’t show the folders and files.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 3
  • Comments: 30 (8 by maintainers)

Most upvoted comments

no, youa re right, it does not; I was pressing space after allow-net which would work

Nope, it’s fixed since 1.21 I think 👌🏻

Hey @carlosala & @mcornella, sorry for not having looked into this yet. i will look at it later today

I found the problem. Updating clap_complete to 3.0.5 creates a correct zsh completion, I tested it compiling only changing that dependency. Also with 3.0.4 works

Just tested with env, net and run and don’t work 😕

It’s only working if I add something after --allow-net. It looks like allow-net is expecting some parameter. So deno run --allow-net foo <tab> is autocompleting the files for me, and without the argument to --allow-net nope.

For me it’s also not working. I think that something changed and continues to not work. It should not be Deno issue, but maybe deno should stay in clap 2.x

Are you using OMZ? If so, please continue the discussion in the issue about this in OMZ repo (it’s linked above). Looks it’s not a Deno issue, let’s keep this issue clean.

try to do a rm -r $ZSH/cache/completions and then re-open a terminal. It should work. Do you have deno installed with package manager or just with the deno native installer?

Thank you @carlosala! rm -r $ZSH/cache/completions worked for me. Just to note, I’m also using the native installer.