rfcs
rfcs copied to clipboard
[RRFC] add bash/zsh completion to npx
Motivation ("The Why")
It is convenient when you can press tab in the console and get a list of commands. This is how almost all console programs work.
Example
This could simplify the use of npx.
How
Current Behaviour
It not working.
Desired Behaviour
npx rea -> npx react-native npx react-native r -> npx react-native run- npx react-native run-android --co -> npx react-native run-android --configuration
References
(https://github.com/npm/cli/issues/4577)
Wouldn't this mean that tab-completion has to contact the registry? npx doesn't just run with local and global bins, but with "anything on npmjs.org"
Wouldn't this mean that tab-completion has to contact the registry? npx doesn't just run with local and global bins, but with "anything on npmjs.org"
that or include an index of 1,910,640 (more the moment after I write this) package names with npx :P
I think this could be fairly robust if it used the npx specific cache, and/or known bins when done in a project directory.