-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Autocomplete for NPM is outputting "garbage" when nvm plugin is installed #4
Comments
Thanks for reporting the issue I will take a look during the weekend. |
Thanks. function nvm
bass source ~/.nvm/nvm.sh ';' nvm $argv
end was enough to make everything work without the whole nvm package. |
You don't need this plugin at all, as you said just putting that on your config.fish is enough. What I don't like is if you do that slows your shell initiation by a couple of seconds, because it sources nvm everytime. That's why I created this plugin, to only source nvm when you use npm, or node or nvm |
If I add this as a new file, |
@BRJ I want to use nvm. I need to test stuff on different node versions and it makes the job much easier than I would be otherwise. Edit: I looked into fnm, and I'll give it a try. I need stuff that can work outside of fish as well. |
So, I installed fnm (
╰▶ fish -v |
Btw fnm has nothing to do with nvm. Now, I was able to repro the problem with npm completions. npm completions work okay with verman (which is what I use now). Would you mind trying out verman also to see if npm completions work fine for you? That would help me determine this is a problem with how fnm creates the npm shim or npm (completions) itself. |
I think the problem may be simply that fnm's npm shim is not inheriting npm completions. This should be doable adding |
I think it has to do with fish-shell npm completions https://github.com/fish-shell/fish-shell/blob/master/share/completions/npm.fish As soon I renamed the file |
@nomaed It seems after all that the problem was not with the plugin, but with the official completions from fish shell, you can read more about it here fish-shell/fish-shell#3159 And the commit that fixes it fish-shell/fish-shell@10661bb : The next release of fish shell will have the completions fixed but until then you can fix them manually by doing this:
and then do |
That is great, thank you for following it up! |
Originally opened as a fish-shell issue: fish-shell/fish-shell#3152
After installing the
nvm
plugin, I get garbage printed out when trying to get auto-completions for npm.Removing
nvm
plugin makes everything work fine.Operating system: OS X El Capitan 10.11.5 (15F34)
Fish version: 2.3.0
Fish installed: using the official DMG.
Fish location: /usr/local/bin/fish
Terminal: iTerm2
Output:
The text was updated successfully, but these errors were encountered: