-
Notifications
You must be signed in to change notification settings - Fork 70
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 nvm current command #111
Comments
@IlanCosman What would |
I would expect it to operate similarly to the "real" In particular I'm requesting this for theming purposes. Most of the other fish nvm addons are merely wrappers around nvm, and therefore use Tide similarly plans to use the It seems beneficial to this project and the users of these fish themes to add an |
How's |
In particular, it returns |
Sorry, but I don't understand how this is useful. What does Tide plan to do with this, and why not |
Tide (and bobthefish) want to display the node version if and only if it's not the system's default version, i.e it's being messed with by nvm. I don't know how
|
Hmm, got it! Okay, so, in FWIW, |
Hmm, perhaps |
I'd just show the Node version, whatever it is. Managed or not makes no difference to me because switching to a particular version of Node with fish-nvm makes it immediately available and shared between all the current user's fish instances, and will be preserved across restarts of the shell as well. I never used the original nvm, but I suspect it doesn't work like that. @ljharb or anyone else is welcome to correct me. Referring "to system node" in my previous comment was a bit misleading. There's usually no system node unless you happen to have node installed already, e.g., you compiled/downloaded it yourself, and that's never been my use case, since I use fish-nvm to get node in the first place. Even if we add an |
Sounds good, thanks for your attention on this :) |
In nvm, nvm displays If you want to know the current node version, |
I just released 2.0. Now there's an $ nvm use latest
Now using Node v15.3.0 (npm 7.0.14) ~/.local/share/nvm/v15.3.0/bin/node
$ nvm current
v15.3.0
$ nvm use system
Now using Node v15.2.0 (npm 7.0.10) /usr/local/bin/node
$ nvm current
system If there's no system node (any previously installed node not managed with nvm) nothing will be printed and |
I think an
nvm current
command would be useful for symmetry with the original nvm and most other fish nvm addons. This would make it simpler for a bash/zsh user to switch to fish and be greeted with the same commands.The text was updated successfully, but these errors were encountered: