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

How does nvm.fish 2.0 compare to Schniz/fnm? #82

Closed
franciscolourenco opened this issue Apr 19, 2019 · 3 comments
Closed

How does nvm.fish 2.0 compare to Schniz/fnm? #82

franciscolourenco opened this issue Apr 19, 2019 · 3 comments
Labels
meta Questions, news and communication

Comments

@franciscolourenco
Copy link
Contributor

Hi @jorgebucaran do you have thoughts on https://github.com/Schniz/fnm ?
Would you recommend using fish-nvm instead?

Thanks!

@jorgebucaran
Copy link
Owner

jorgebucaran commented Apr 19, 2019

I'll try to be fair in this comparison, but it might be difficult. You've been warned. Let's dive in!

  • fnm appends code to your config.fish (or creates one if there isn't one). I didn't expect this.
  • fnm is written in OCaml Rust, which is super interesting in its own right.
    • nvm.fish is written in Fish, which is the most logical choice for a shell utility that demands seamless shell integration.
  • fnm pollutes my home directory, it saves its state in ~/.fnm
  • fnm requires you to launch a new shell after installing it
    • nvm.fish works out of the box via Fisher.
  • fnm runs fnm env --multi | source on shell startup. I am not a fan of piping stuff to source.
    • nvm.fish uses Fish canonical autorun mechanism: configuration snippets.
  • I had to curl the fnm installer and pipe it to bash to install fnm.
    • nvm.fish is easier to install, update, and uninstall via Fisher.
  • I had to debug an error after installing fnm. It turns out I had to run brew install openssl.
    • nvm.fish works out of the box. No dependencies other than Fish are required.
  • fnm completions are mediocre.
    • nvm.fish tab completions are amazing.
      • nvm installTab shows you every available version to install + aliases. (Screen)
      • nvm useTab shows you only versions you can use (already downloaded) + aliases. (Screen)
      • nvm uninstallTab shows you only versions you can uninstall + aliases. (Screen)

Benchmarks

$ ~/D/h/bin> time fish -c "fnm install latest"
Looking for node latest for darwin x64
Downloading https://nodejs.org/dist/latest/node-v11.14.0-darwin-x64.tar.xz to /Users/jb/.fnm/downloads/v11.14.0.tar.xz
Extracting /Users/jb/.fnm/downloads/v11.14.0.tar.xz to /Users/jb/.fnm/node-versions/v11.14.0
        9.08 real         1.49 user         1.70 sys
$ ~/D/h/bin> time fish -c "nvm use latest"
fetching https://nodejs.org/dist/v11.14.0/node-v11.14.0-darwin-x64
######################################################################## 100.0%
        8.05 real         1.02 user         1.44 sys

@jorgebucaran jorgebucaran added the meta Questions, news and communication label Apr 19, 2019
@franciscolourenco
Copy link
Contributor Author

Thanks!

@jorgebucaran jorgebucaran pinned this issue Apr 27, 2019
@jorgebucaran jorgebucaran changed the title Comparison with fnm How does fish-nvm compare to Schniz/fnm? Apr 27, 2019
@thernstig thernstig mentioned this issue Dec 6, 2020
@jorgebucaran
Copy link
Owner

I just released 2.0. The new nvm.fish has been rewritten for Fish 3.0, and special attention has been paid to performance and optimizing every aspect of it. As a result nvm.fish feels snappier than ever while still giving you that seamless integration with Fish.

@jorgebucaran jorgebucaran changed the title How does fish-nvm compare to Schniz/fnm? How does nvm.fish 2.0 compare to Schniz/fnm? Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Questions, news and communication
Projects
None yet
Development

No branches or pull requests

2 participants