-
Notifications
You must be signed in to change notification settings - Fork 68
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
How to automatically switch to default version when I'm not near an .fnmrc? #58
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The new version of this package will not feature automatic version switching (no custom I understand @corysimmons sentiment of using |
Oh hey Jorge! I didn't even notice this was your lib. :D |
@jorgebucaran You wrote:
I searched the repsitory, yet couldn't find such a documentation or example. Could you hint me at a direction, on how to do so, as I am fairly new to Once I figure it out, I could make a PR to the |
@caillou Here's a simple/naive implementation:
function node
nvm && command node $argv
end |
@jorgebucaran Thanks for your quick answer. Unfortunately I usually use node implicitly, meaning I use a global # This is my main use case
$ npm install tldr
$ tldr curl
# This is the one that usually requires an out-dated node verion
$ ./node_modules/.bin/gulp --dev I am looking for a way to execute |
@jorgebucaran I found an answer to my problem, will send a PR to the function __check_nvm --on-variable PWD --description 'Check nvm version on directoy change'
status --is-command-substitution; and return
nvm
end |
@jorgebucaran Sorry to disturb one more time. Given the This being said, it does not work in a new session. I need to call So I went ahead and naively added Functions are not shown anymore in the web interface of Do you have an idea why this is so? What am I doing wrong? Do I need to call |
Makes sense. Not what you want, though.
Nope. I couldn't reproduced it either. I added the following to my function on_pwd_change_do --on-variable PWD
status --is-command-substitution && return
echo foo
end ...switched directories a few times, ran |
@jorgebucaran Thank you for your quick and exhaustive answer. Your approach works, but does not call Executing It makes sense to run I tried running I also noticed that |
Couldn't repro that either. Here's my suggestion: create a configuration snippet like mkdir -p ~/.config/fish/conf.d
echo nvm > ~/.config/fish/conf.d/nvm.fish
Correct.
Yes. In this way, it's similar to tj/n as far as I remember (don't know if they changed it recently). |
I feel like
.fnmrc
should only temporarily swap node version. :\The text was updated successfully, but these errors were encountered: