carapace-bin icon indicating copy to clipboard operation
carapace-bin copied to clipboard

npm completer

Open rsteube opened this issue 3 years ago • 3 comments

Command

npm

Description

npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.

Homepage

https://www.npmjs.com/

Documentation

https://docs.npmjs.com/cli/

Repository

https://github.com/npm/cli

Complexity

L

Anything else?

No response

Tasks

test and fix completion

  • [ ] access
  • [ ] adduser
  • [ ] audit
  • [ ] bin
  • [ ] bugs
  • [ ] cache
  • [ ] ci
  • [ ] completion
  • [ ] config
  • [ ] dedupe
  • [ ] deprecate
  • [ ] diff
  • [ ] dist-tag
  • [ ] docs
  • [ ] doctor
  • [ ] edit
  • [ ] exec
  • [ ] explain
  • [ ] explore
  • [ ] find-dupes
  • [ ] fund
  • [ ] get
  • [ ] help
  • [ ] hook
  • [ ] init
  • [ ] install
  • [ ] install-ci-test
  • [ ] install-test
  • [ ] link
  • [ ] ll
  • [ ] login
  • [ ] logout
  • [ ] ls
  • [ ] org
  • [ ] outdated
  • [ ] owner
  • [ ] pack
  • [ ] ping
  • [ ] prefix
  • [ ] profile
  • [ ] prune
  • [ ] publish
  • [ ] rebuild
  • [ ] repo
  • [ ] restart
  • [ ] root
  • [ ] run-script
  • [ ] search
  • [ ] set
  • [ ] set-script
  • [ ] shrinkwrap
  • [ ] star
  • [ ] stars
  • [ ] start
  • [ ] stop
  • [ ] team
  • [ ] test
  • [ ] token
  • [ ] uninstall
  • [ ] unpublish
  • [ ] unstar
  • [ ] update
  • [ ] version
  • [ ] view
  • [ ] whoami

Polar

Fund with Polar

rsteube avatar Jul 09 '21 09:07 rsteube

run-script works fine! But run, which is an alias for run-script, does not. It is not recognized as a command. I guess the generated file for run should be exactly the same as this one: https://github.com/rsteube/carapace-bin/blob/master/completers/npm_completer/cmd/runScript.go (?). Can I help somehow?

brunoroque06 avatar Aug 08 '22 20:08 brunoroque06

You can add Aliases: []string{"run"} to the runScript command.

Here's an example: https://github.com/rsteube/carapace-bin/blob/master/completers/git_completer/cmd/blame.go#L13

rsteube avatar Aug 08 '22 20:08 rsteube

Perfect, thanks! Just tested it locally, and it worked.

brunoroque06 avatar Aug 09 '22 20:08 brunoroque06