npm link - Scoped Packages Autocompletion not working

cli
priority:low
triaged

(Antonio Terrero) #1

What I Wanted to Do

I have my own scoped packages linked, but whenever I want to link them on a project the “npm link” autocompletion doesn’t recognize them, it only autocompletes the scope name.

Example of package.json
@my-scope/first-module
@my-scope/second-module

Linking those packages will generate a folder called @my-scope with two symbolic links called “first-module” and “second-module”, which is right.

What Happened Instead

When we try to link them locally “npm link @my-sc” autocompletion here will type "npm link @my-scope " instead of “npm link @my-scope/”.

If we manually type “npm link @my-scope/” autocompletion won’t find anything.

Platform Info

This has been tested using Ubuntu Budgie 18.04

$ npm --versions
{ 'my-project': '0.1.0',
  npm: '6.4.1',
  ares: '1.14.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.32.0',
  node: '10.8.0',
  openssl: '1.1.0h',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.22.0',
  v8: '6.7.288.49-node.19',
  zlib: '1.2.11' }

$ node -p process.platform
linux