completion for install, publish, cache add #719

Closed
isaacs opened this Issue Mar 18, 2011 · 3 comments

Projects

None yet

5 participants

@isaacs
Member
isaacs commented Mar 18, 2011

should use minimatch, and the find() function should take a glob.

@ralt
Contributor
ralt commented Mar 12, 2013

2 years without any news. @isaacs is it implemented/abandoned/patch welcomed?

This was referenced Mar 12, 2013
@timoxley
Member
timoxley commented Jan 7, 2014

Completion seems to be implemented for install at least. @isaacs What find() function are you referring to?

@othiym23
Contributor
  1. npm publish only takes completion when publishing a tarball, directory containing a package, or a tarball URL. The first two are completable, and would be handy to have, but whether they use glob or something else is an implementation detail.
  2. npm install had its completion nerfed back in 2014, when it started being a major source of load on the CouchDBs backing the primary registry. Generating a list of all package names made a lot more sense when there were only a few hundred packages. We're in the deeply prolonged process of switching that completion (which currently doesn't work) to using the same completion engine used by the npm web site, and that may or may not use glob on the back end, but since it's implemented by somebody else, the CLI team doesn't care.
  3. npm cache add reuses npm install's completion engine.

So! It would be nice to have working completion for all of those things, but in the intervening time, using glob has become less of a pressing concern next to figuring out how to deal with effectively completing when there are literally hundreds of thousands of alternatives to choose from. I've added patch-welcome to this because getting the basic completion up and running to npm publish would be useful for the small number of people who publish packages other than the current one. That said, this isn't something the CLI team is going to have to have the resources to address itself. Thanks for filing away this note, @isaacs!

@othiym23 othiym23 closed this Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment