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

Revisit $fish_user_paths usage #114

Closed
jorgebucaran opened this issue Aug 2, 2020 · 10 comments
Closed

Revisit $fish_user_paths usage #114

jorgebucaran opened this issue Aug 2, 2020 · 10 comments

Comments

@jorgebucaran
Copy link
Owner

jorgebucaran commented Aug 2, 2020

If nvm.fish tries to set -U fish_user_paths ... $fish_user_paths, the following error can occur if $fish_user_paths has global scope:

set: Universal variable 'fish_user_paths' is shadowed by the global variable of the same name.

See: #107

@nathan-gilbert
Copy link

I am getting this error

@jorgebucaran
Copy link
Owner Author

Just set the variable to universal scope for now.

@jackwestmoretab
Copy link

jackwestmoretab commented Nov 11, 2020

I think that a simple fix for this might be to change the offending line to: set fish_user_paths "$nvm_config/$ver/bin" $fish_user_paths

i.e., remove the -U setting. This simply appends "$nvm_config/$ver/bin" to whatever is in the user's fish_user_paths already. Works on my system.

@jorgebucaran
Copy link
Owner Author

@jackwestmoretab Yes, makes sense. 👍

@jackwestmoretab
Copy link

@jorgebucaran would you like me to make a Pull Request to this effect?

@jorgebucaran
Copy link
Owner Author

@jackwestmoretab Yes, go ahead, please! 💯

@jackwestmoretab
Copy link

@jorgebucaran #121

@arbourd
Copy link

arbourd commented Nov 25, 2020

Anyway to use this great implementation of nvm in the meantime? I only get errors even if I set it on my path manually.

My work around was change the script itself in functions.

@jorgebucaran
Copy link
Owner Author

@arbourd PR #123.

@jorgebucaran
Copy link
Owner Author

jorgebucaran commented Dec 5, 2020

I just released 2.0. We're no longer using fish_user_paths. Installing or activating a version now changes the current shell only, for which we modify the PATH directly.

@arbourd @nathan-gilbert @jackwestmoretab @sh78 👋

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

No branches or pull requests

4 participants