lukechilds / zsh-better-npm-completion

Better completion for npm
MIT License
464 stars 35 forks source link

add completions for npx #12

Open hlolli opened 6 years ago

hlolli commented 6 years ago

As suggested in https://github.com/lukechilds/zsh-better-npm-completion/issues/11

lukechilds commented 6 years ago

Thanks @hlolli this looks great!

Just about to head to a family get together for the weekend but will review this when I'm back next week.

I did take a quick peek, this is great as-is, but bonus points for checking globally installed binaries too.

hlolli commented 6 years ago

I was mostly having problems with falling back to default completions on a new argument field, already stopped the completions on arguments after the 2nd one (the executable), but then I just get no completions at all, would like to get the filesystem completions. Going to look at this when I have time, busy days atm.. The bonus point should be easy to earn, tough generally, it's a bad practice to npx something which isn't declared in a package (and I think package-local executeables have precedence). I guess people use it when they don't add the global npm .bin directory to their path (which also sounds like a bad practice, but I tend to do that).

Gerschtli commented 5 years ago

Hey guys, what is the state of this PR? Would love to see this merged! :)

vegerot commented 4 years ago

Wondering this too

vegerot commented 3 years ago

Since apparently this isn't maintained anymore, I have simply started using @hlolli 's fork. Instructions for anyone else:

As an Oh My ZSH! custom plugin

Clone zsh-better-npm-completion into your custom plugins repo

git clone https://github.com/hlolli/zsh-better-npm-completion ~/.oh-my-zsh/custom/plugins/zsh-better-npm-completion

Then load as a plugin in your .zshrc

plugins+=(zsh-better-npm-completion)
iloveitaly commented 1 year ago

@lukechilds this looks like a great PR, I'd love to help maintain this package if you'd like!