Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add completions for npx #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add completions for npx #12

wants to merge 1 commit into from

Conversation

hlolli
Copy link

@hlolli hlolli commented Sep 7, 2018

As suggested in #11

@lukechilds
Copy link
Owner

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
Copy link
Author

hlolli commented Sep 8, 2018

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
Copy link

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

@vegerot
Copy link

vegerot commented Feb 11, 2020

Wondering this too

@vegerot
Copy link

vegerot commented Nov 24, 2020

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants