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

NVM in fish #303

Open
ecbrodie opened this Issue Oct 10, 2013 · 36 comments

Comments

Projects
None yet
@ecbrodie

ecbrodie commented Oct 10, 2013

How do I install NVM for the fish shell?

@djensen47

This comment has been minimized.

Show comment
Hide comment
@djensen47

djensen47 Oct 14, 2013

May I request that this issue be reformatted in the form of a bug?

  • NVM does not install if you use the fish shell.
  • NVM does not work in the fish shell shell shell if previously installed in the bash shell. In fact, nvm isn't even in the path.

djensen47 commented Oct 14, 2013

May I request that this issue be reformatted in the form of a bug?

  • NVM does not install if you use the fish shell.
  • NVM does not work in the fish shell shell shell if previously installed in the bash shell. In fact, nvm isn't even in the path.
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Apr 20, 2014

Collaborator

I attempted to test this out - . nvm.sh didn't work in the fish shell, even with the shebang for /bin/sh or /bin/bash.

I'm not sure if a script can be portable across bash/sh/dash/ksh and still work in fish. For example, $? to indicate success doesn't work in fish, it's $status, which none of the other shells have.

Most worrying, all the other shells' function syntax doesn't work in fish. I suspect we'd need a brand new nvm.fish to make this work properly.

Collaborator

ljharb commented Apr 20, 2014

I attempted to test this out - . nvm.sh didn't work in the fish shell, even with the shebang for /bin/sh or /bin/bash.

I'm not sure if a script can be portable across bash/sh/dash/ksh and still work in fish. For example, $? to indicate success doesn't work in fish, it's $status, which none of the other shells have.

Most worrying, all the other shells' function syntax doesn't work in fish. I suspect we'd need a brand new nvm.fish to make this work properly.

@alex7kom

This comment has been minimized.

Show comment
Hide comment
@alex7kom

alex7kom Apr 20, 2014

Contributor

Not a self-promotion, but I did port nvm to fish, please check https://github.com/Alex7Kom/nvm-fish
I rewrote it entirely since fish is very different. If nvm.fish fits in the main nvm project, I'll be happy to contribute it.

Contributor

alex7kom commented Apr 20, 2014

Not a self-promotion, but I did port nvm to fish, please check https://github.com/Alex7Kom/nvm-fish
I rewrote it entirely since fish is very different. If nvm.fish fits in the main nvm project, I'll be happy to contribute it.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Apr 20, 2014

Collaborator

@alex7kom does your port share the same env vars and directory of node versions and global modules that standard nvm does?

Collaborator

ljharb commented Apr 20, 2014

@alex7kom does your port share the same env vars and directory of node versions and global modules that standard nvm does?

@alex7kom

This comment has been minimized.

Show comment
Hide comment
@alex7kom

alex7kom Apr 20, 2014

Contributor

@ljharb I tried to make it as close to standard nvm as possible, so it uses the same naming everywhere, and it should use the same directory of node versions if put in the same directory as standard nvm. However, I didn't update it for 4 months, so I'll need some time to achieve parity with nvm.
I hope I understood you right.

Contributor

alex7kom commented Apr 20, 2014

@ljharb I tried to make it as close to standard nvm as possible, so it uses the same naming everywhere, and it should use the same directory of node versions if put in the same directory as standard nvm. However, I didn't update it for 4 months, so I'll need some time to achieve parity with nvm.
I hope I understood you right.

@creationix

This comment has been minimized.

Show comment
Hide comment
@creationix

creationix Apr 21, 2014

Owner

@alex7kom This is great! I wanted to implement nvm for fish, but never found the time to learn fish well enough to do it. You are right that a complete rewrite was needed.

/me goes off to install fish and test it.

Owner

creationix commented Apr 21, 2014

@alex7kom This is great! I wanted to implement nvm for fish, but never found the time to learn fish well enough to do it. You are right that a complete rewrite was needed.

/me goes off to install fish and test it.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Apr 22, 2014

Collaborator

@alex7kom Honestly, if you can commit to keeping your fish port up to date such that it can be a seamless drop-in for standard nvm, and i could simultaneously use installed nodes in one tab with a bash shell and another with a fish shell; they read the same .nvmrc files; and if it could use git-tagged versions; etc - what I'd prefer is for the install script to be able to intelligently install your fork rather than incorporate it into this repo.

Thoughts?

Collaborator

ljharb commented Apr 22, 2014

@alex7kom Honestly, if you can commit to keeping your fish port up to date such that it can be a seamless drop-in for standard nvm, and i could simultaneously use installed nodes in one tab with a bash shell and another with a fish shell; they read the same .nvmrc files; and if it could use git-tagged versions; etc - what I'd prefer is for the install script to be able to intelligently install your fork rather than incorporate it into this repo.

Thoughts?

@wires

This comment has been minimized.

Show comment
Hide comment
@wires

wires May 28, 2014

I tried it, works nice, thanks! 👍 Just a thought, python virtualenv provides bin/activate for bash-ish shells and bin/activate.fish for fish. If nvm could do something similar that would be nice. Also note that a .fish script could still use sh to delegate some work (installing etc) to the nvm bash version.

wires commented May 28, 2014

I tried it, works nice, thanks! 👍 Just a thought, python virtualenv provides bin/activate for bash-ish shells and bin/activate.fish for fish. If nvm could do something similar that would be nice. Also note that a .fish script could still use sh to delegate some work (installing etc) to the nvm bash version.

@ljharb ljharb added the shell: fish label Jul 9, 2014

@Globegitter

This comment has been minimized.

Show comment
Hide comment
@Globegitter

Globegitter Aug 25, 2014

https://github.com/Alex7Kom/nvm-fish has worked great for me. Would love to see the main project support fish out of the box at some point.

Globegitter commented Aug 25, 2014

https://github.com/Alex7Kom/nvm-fish has worked great for me. Would love to see the main project support fish out of the box at some point.

@doughsay

This comment has been minimized.

Show comment
Hide comment
@doughsay

doughsay Jan 29, 2015

Sorry to dredge up an old issue, but with all the recent hype about io.js, and with the latest nvm now supporting installing io.js, this has become a bigger issue for fish users again. The latest version of the nvm-fish fork is woefully outdated compared to current nvm, and so therefore can't be used to install io.js. Has any more thought been put into this?

doughsay commented Jan 29, 2015

Sorry to dredge up an old issue, but with all the recent hype about io.js, and with the latest nvm now supporting installing io.js, this has become a bigger issue for fish users again. The latest version of the nvm-fish fork is woefully outdated compared to current nvm, and so therefore can't be used to install io.js. Has any more thought been put into this?

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jan 29, 2015

Collaborator

There's a PR open to get it to work, but fish being wildly different than most shells, some of the changes required concern me. I'm still open to the possibility.

Collaborator

ljharb commented Jan 29, 2015

There's a PR open to get it to work, but fish being wildly different than most shells, some of the changes required concern me. I'm still open to the possibility.

@passcod

This comment has been minimized.

Show comment
Hide comment
@passcod

passcod Feb 7, 2015

Contributor

I've written a wrapper that lets fish people use nvm seamlessly: https://github.com/passcod/nvm-fish-wrapper 🐟

It works by running nvm in bash within a fish function, and doing some magic to pass the (relevant parts of the) environment through and export it again once nvm returns. Doing so incurs a noticeable delay (about 1 second) before nvm is run, but I think that's acceptable. Because it's just a wrapper, it will always work (unlike the nvm-fish port), requiring no maintenance while nvm can be updated at will, unless nvm changes significantly. Additionally, it uses the same nvm as other shells, so nodes (and ios) are shared (again, unlike the nvm-fish port). And it's less than two pagefuls of code ;P

It is similar in thought to #579 but less intrusive and requires no changes in nvm.

Contributor

passcod commented Feb 7, 2015

I've written a wrapper that lets fish people use nvm seamlessly: https://github.com/passcod/nvm-fish-wrapper 🐟

It works by running nvm in bash within a fish function, and doing some magic to pass the (relevant parts of the) environment through and export it again once nvm returns. Doing so incurs a noticeable delay (about 1 second) before nvm is run, but I think that's acceptable. Because it's just a wrapper, it will always work (unlike the nvm-fish port), requiring no maintenance while nvm can be updated at will, unless nvm changes significantly. Additionally, it uses the same nvm as other shells, so nodes (and ios) are shared (again, unlike the nvm-fish port). And it's less than two pagefuls of code ;P

It is similar in thought to #579 but less intrusive and requires no changes in nvm.

ljharb added a commit that referenced this issue Feb 7, 2015

Merge pull request #648 from passcod/patch-1
Update README: Point fish users in the right direction (relates to #303)
@edc

This comment has been minimized.

Show comment
Hide comment
@edc

edc Jul 13, 2015

I also wrote a general wrapper to bring almost any bash utility to fish shell: https://github.com/edc/bass. It works flawlessly with nvm using syntax like bass source ~/.nvm/nvm.sh \; nvm --version. For convenience, one can create an alias Fish function:

function nvm
      bass source ~/.nvm/nvm.sh ';' nvm $argv
  end

and then just use nvm --version, nvm ls, etc.

edc commented Jul 13, 2015

I also wrote a general wrapper to bring almost any bash utility to fish shell: https://github.com/edc/bass. It works flawlessly with nvm using syntax like bass source ~/.nvm/nvm.sh \; nvm --version. For convenience, one can create an alias Fish function:

function nvm
      bass source ~/.nvm/nvm.sh ';' nvm $argv
  end

and then just use nvm --version, nvm ls, etc.

@passcod

This comment has been minimized.

Show comment
Hide comment
@passcod

passcod Jul 13, 2015

Contributor

@edc This is really cool! Does it work as well on linux and on OS X? If so I'll post a notice on nvm-fish-wrapper to use bass instead.

Contributor

passcod commented Jul 13, 2015

@edc This is really cool! Does it work as well on linux and on OS X? If so I'll post a notice on nvm-fish-wrapper to use bass instead.

@edc

This comment has been minimized.

Show comment
Hide comment
@edc

edc Jul 13, 2015

@passcod I only tested it on OS X. Should work on Linux. It probably does not work on Windows.

edc commented Jul 13, 2015

@passcod I only tested it on OS X. Should work on Linux. It probably does not work on Windows.

passcod added a commit to passcod/nvm-fish-wrapper that referenced this issue Jul 25, 2015

Thank you all
Thanks to @edc for creating bass.

Thanks to @lnikkila and @brandonweiss for code contributions.

Thanks to @keithamus, @externl, @blazeworx, @taktran, @jkarttunen, @jakubholynet, @doughsay, @alex7kom, @msx, @steve-ross, @leebrooks0, @nanoxd, @tomekiwi, @randyschneck, @jadengore, as well as the contributors above for reporting bugs and helping out in the issue threads.

Thanks also to all stargazers not mentioned above: @Globegitter, @luhmann, @oahziur, @mike-engel, @yamafaktory, @footearth, @pborenstein, @ceejbot (famous npm people starring my work! *o*), @plord, @sobering, @matthewspencer, @rossluebe, @d6u, @arnaudsj, @jney, @arbourd, @jeromecovington, @mhamann, @kompot, @cryptoquick, @sarkian, @blissdev, @Thimoteus, @eush77, @dd1994, @berkus, @judasnow, @paulriddle, @giodamelio, @ScottMaclure, @deepsweet, @Maxim-Tuvanov, @CarterTsai, @Lordnibbler, @ismay, @OtaK, @nicksergeant, @SeeThruHead, @halhenke, @jerray, @therocketforever, @colinmeinke, @MadMub, @barberousse, @karlbateman, @benmarten, @mistadikay, @AdamCanady, @bheesham, @jboulouloubi, @moretti, @adri, @RFS4ever, @hcevns, @zhongxingdou, @marceloboeira, @musically-ut, @fuzetsu, @makotot, @tomekwi, @jeffbcross (dear me, an Angular.js committer?! *o*), @olessavluk, @imposibrus, @AndreTheHunter, @volodymyrkoval, @denji, @nemoDreamer, @legatoo, @atesgoral, @ThomWright, @jcrben, @ZuraGuerra, @andyklimczak, @Nek, @a1ip, @alfredooo, @passerbyid, @dariuszdziuk (hello Spotify, listening with you right this moment), @lordzfc, @StepanKuzmin, @joshhunt, @daniel-shin1104, @michalmarczyk, and @knappg.

Thanks to @creationix for creating NVM.

Thanks to all those on the creationix/nvm#303 thread.

Thanks to @alxcenz for being a constant inspiration and a friend.

Thanks to @makoConstruct for visions of a better future.

Thanks to all of Merveilles for reasons.

Thanks to Saf for being a bright star shining always.

Thanks to Léa. Je t'aime.

Thanks to my parents for letting me code until the wee hours of the morning. To Dad for giving me help with Logo. That turtle is the best thing that's happened to my programming.

Thanks to all you awesome people, past present and future.

…okay, that got long and involved and a bit over the top. It's been humbling to have all these people on a project. Have a good day, friends.

bbuck added a commit to bbuck/nvm that referenced this issue Aug 6, 2015

Update README.markdown
Adds information about bass to the README which is directly recommended by nvm-fish-wrapper and can support iojs (unlike nvm-fish), this is in relation to Issue #303.

passcod added a commit to passcod/nvm-fish-wrapper that referenced this issue Aug 15, 2015

Thank you all
Thanks to @edc for creating bass.

Thanks to @lnikkila and @brandonweiss for code contributions.

Thanks to @keithamus, @externl, @blazeworx, @taktran, @jkarttunen, @jakubholynet, @doughsay, @alex7kom, @msx, @steve-ross, @leebrooks0, @nanoxd, @tomekiwi, @randyschneck, @jadengore, as well as the contributors above for reporting bugs and helping out in the issue threads.

Thanks also to all stargazers not mentioned above: @Globegitter, @luhmann, @oahziur, @mike-engel, @yamafaktory, @footearth, @pborenstein, @ceejbot (famous npm people starring my work! *o*), @plord, @sobering, @matthewspencer, @rossluebe, @d6u, @arnaudsj, @jney, @arbourd, @jeromecovington, @mhamann, @kompot, @cryptoquick, @sarkian, @blissdev, @Thimoteus, @eush77, @dd1994, @berkus, @judasnow, @paulriddle, @giodamelio, @ScottMaclure, @deepsweet, @Maxim-Tuvanov, @CarterTsai, @Lordnibbler, @ismay, @OtaK, @nicksergeant, @SeeThruHead, @halhenke, @jerray, @therocketforever, @colinmeinke, @MadMub, @barberousse, @karlbateman, @benmarten, @mistadikay, @AdamCanady, @bheesham, @jboulouloubi, @moretti, @adri, @RFS4ever, @hcevns, @zhongxingdou, @marceloboeira, @musically-ut, @fuzetsu, @makotot, @tomekwi, @jeffbcross (dear me, an Angular.js committer?! *o*), @olessavluk, @imposibrus, @AndreTheHunter, @volodymyrkoval, @denji, @nemoDreamer, @legatoo, @atesgoral, @ThomWright, @jcrben, @ZuraGuerra, @andyklimczak, @Nek, @a1ip, @alfredooo, @passerbyid, @dariuszdziuk (hello Spotify, listening with you right this moment), @lordzfc, @StepanKuzmin, @joshhunt, @daniel-shin1104, @michalmarczyk, and @knappg.

Thanks to @creationix for creating NVM.

Thanks to all those on the creationix/nvm#303 thread.

Thanks to @alxcenz for being a constant inspiration and a friend.

Thanks to @makoConstruct for visions of a better future.

Thanks to all of Merveilles for reasons.

Thanks to Saf for being a bright star shining always.

Thanks to Léa. Je t'aime.

Thanks to my parents for letting me code until the wee hours of the morning. To Dad for giving me help with Logo. That turtle is the best thing that's happened to my programming.

Thanks to all you awesome people, past present and future.

…okay, that got long and involved and a bit over the top. It's been humbling to have all these people on a project. Have a good day, friends.

passcod added a commit to passcod/nvm-fish-wrapper that referenced this issue Aug 16, 2015

Thank you all
Thanks to @edc for creating bass.

Thanks to @lnikkila and @brandonweiss for code contributions.

Thanks to @keithamus, @externl, @blazeworx, @taktran, @jkarttunen, @jakubholynet, @doughsay, @alex7kom, @msx, @steve-ross, @leebrooks0, @nanoxd, @tomekiwi, @randyschneck, @jadengore, as well as the contributors above for reporting bugs and helping out in the issue threads.

Thanks also to all stargazers not mentioned above: @Globegitter, @luhmann, @oahziur, @mike-engel, @yamafaktory, @footearth, @pborenstein, @ceejbot (famous npm people starring my work! *o*), @plord, @sobering, @matthewspencer, @rossluebe, @d6u, @arnaudsj, @jney, @arbourd, @jeromecovington, @mhamann, @kompot, @cryptoquick, @sarkian, @blissdev, @Thimoteus, @eush77, @dd1994, @berkus, @judasnow, @paulriddle, @giodamelio, @ScottMaclure, @deepsweet, @Maxim-Tuvanov, @CarterTsai, @Lordnibbler, @ismay, @OtaK, @nicksergeant, @SeeThruHead, @halhenke, @jerray, @therocketforever, @colinmeinke, @MadMub, @barberousse, @karlbateman, @benmarten, @mistadikay, @AdamCanady, @bheesham, @jboulouloubi, @moretti, @adri, @RFS4ever, @hcevns, @zhongxingdou, @marceloboeira, @musically-ut, @fuzetsu, @makotot, @tomekwi, @jeffbcross (dear me, an Angular.js committer?! *o*), @olessavluk, @imposibrus, @AndreTheHunter, @volodymyrkoval, @denji, @nemoDreamer, @legatoo, @atesgoral, @ThomWright, @jcrben, @ZuraGuerra, @andyklimczak, @Nek, @a1ip, @alfredooo, @passerbyid, @dariuszdziuk (hello Spotify, listening with you right this moment), @lordzfc, @StepanKuzmin, @joshhunt, @daniel-shin1104, @michalmarczyk, and @knappg.

Thanks to @creationix for creating NVM.

Thanks to all those on the creationix/nvm#303 thread.

Thanks to @alxcenz for being a constant inspiration and a friend.

Thanks to @makoConstruct for visions of a better future.

Thanks to all of Merveilles for reasons.

Thanks to Saf for being a bright star shining always.

Thanks to Léa. Je t'aime.

Thanks to my parents for letting me code until the wee hours of the morning. To Dad for giving me help with Logo. That turtle is the best thing that's happened to my programming.

Thanks to all you awesome people, past present and future.

…okay, that got long and involved and a bit over the top. It's been humbling to have all these people on a project. Have a good day, friends.
@derekstavis

This comment has been minimized.

Show comment
Hide comment
@derekstavis

derekstavis Sep 8, 2015

Contributor

If you use Oh My Fish framework you can use foreign-env to run nvm just like bass does. In fact, the plugin is a rewrite of bass in pure fish :)

Contributor

derekstavis commented Sep 8, 2015

If you use Oh My Fish framework you can use foreign-env to run nvm just like bass does. In fact, the plugin is a rewrite of bass in pure fish :)

passcod added a commit to passcod/nvm-fish-wrapper that referenced this issue Sep 26, 2015

Thank you all
Thanks to @edc for creating bass.

Thanks to @lnikkila and @brandonweiss for code contributions.

Thanks to @keithamus, @externl, @blazeworx, @taktran, @jkarttunen, @jakubholynet, @doughsay, @alex7kom, @msx, @steve-ross, @leebrooks0, @nanoxd, @tomekiwi, @randyschneck, @jadengore, as well as the contributors above for reporting bugs and helping out in the issue threads.

Thanks also to all stargazers not mentioned above: @Globegitter, @luhmann, @oahziur, @mike-engel, @yamafaktory, @footearth, @pborenstein, @ceejbot (famous npm people starring my work! *o*), @plord, @sobering, @matthewspencer, @rossluebe, @d6u, @arnaudsj, @jney, @arbourd, @jeromecovington, @mhamann, @kompot, @cryptoquick, @sarkian, @blissdev, @Thimoteus, @eush77, @dd1994, @berkus, @judasnow, @paulriddle, @giodamelio, @ScottMaclure, @deepsweet, @Maxim-Tuvanov, @CarterTsai, @Lordnibbler, @ismay, @OtaK, @nicksergeant, @SeeThruHead, @halhenke, @jerray, @therocketforever, @colinmeinke, @MadMub, @barberousse, @karlbateman, @benmarten, @mistadikay, @AdamCanady, @bheesham, @jboulouloubi, @moretti, @adri, @RFS4ever, @hcevns, @zhongxingdou, @marceloboeira, @musically-ut, @fuzetsu, @makotot, @tomekwi, @jeffbcross (dear me, an Angular.js committer?! *o*), @olessavluk, @imposibrus, @AndreTheHunter, @volodymyrkoval, @denji, @nemoDreamer, @legatoo, @atesgoral, @ThomWright, @jcrben, @ZuraGuerra, @andyklimczak, @Nek, @a1ip, @alfredooo, @passerbyid, @dariuszdziuk (hello Spotify, listening with you right this moment), @lordzfc, @StepanKuzmin, @joshhunt, @daniel-shin1104, @michalmarczyk, and @knappg.

Thanks to @creationix for creating NVM.

Thanks to all those on the creationix/nvm#303 thread.

Thanks to @alxcenz for being a constant inspiration and a friend.

Thanks to @makoConstruct for visions of a better future.

Thanks to all of Merveilles for reasons.

Thanks to Saf for being a bright star shining always.

Thanks to Léa. Je t'aime.

Thanks to my parents for letting me code until the wee hours of the morning. To Dad for giving me help with Logo. That turtle is the best thing that's happened to my programming.

Thanks to all you awesome people, past present and future.

…okay, that got long and involved and a bit over the top. It's been humbling to have all these people on a project. Have a good day, friends.
@estebanprimost

This comment has been minimized.

Show comment
Hide comment
@estebanprimost

estebanprimost Oct 15, 2015

@derekstavis That's a great tip, thanks. With bass I have some troubles, but with fish functions + foreign-env it works!:

# ~/.config/fish/functions/nvm.fish
# $NVM_DIR=your nvm install path
function nvm
    fenv source $NVM_DIR/nvm.sh \; nvm $argv
end

estebanprimost commented Oct 15, 2015

@derekstavis That's a great tip, thanks. With bass I have some troubles, but with fish functions + foreign-env it works!:

# ~/.config/fish/functions/nvm.fish
# $NVM_DIR=your nvm install path
function nvm
    fenv source $NVM_DIR/nvm.sh \; nvm $argv
end
@derekstavis

This comment has been minimized.

Show comment
Hide comment
@derekstavis

derekstavis Oct 15, 2015

Contributor

@estebanprimost Now we have a dedicated nvm package. Just omf install nvm. Awesome fish completions included! 🍻

Contributor

derekstavis commented Oct 15, 2015

@estebanprimost Now we have a dedicated nvm package. Just omf install nvm. Awesome fish completions included! 🍻

@estebanprimost

This comment has been minimized.

Show comment
Hide comment
@estebanprimost

estebanprimost commented Oct 15, 2015

@derekstavis Great! Thanks.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Oct 15, 2015

Collaborator

@derekstavis it'd be helpful if you could make a PR that mentions that in the docs, just like there's a Windows option.

Collaborator

ljharb commented Oct 15, 2015

@derekstavis it'd be helpful if you could make a PR that mentions that in the docs, just like there's a Windows option.

@tonatiuh

This comment has been minimized.

Show comment
Hide comment
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Mar 2, 2016

Collaborator

that's a pretty effed up takedown :-/

Collaborator

ljharb commented Mar 2, 2016

that's a pretty effed up takedown :-/

@passcod

This comment has been minimized.

Show comment
Hide comment
@passcod

passcod Mar 2, 2016

Contributor

Man, again? I thought they resolved this. The omf project seems to be plagued with copyright problems.

Contributor

passcod commented Mar 2, 2016

Man, again? I thought they resolved this. The omf project seems to be plagued with copyright problems.

@derekstavis

This comment has been minimized.

Show comment
Hide comment
@derekstavis

derekstavis Mar 2, 2016

Contributor

Man, again? I thought they resolved this.

We also thought this was solved, but then we got striked again by dirty competition. Github should be freeing our repository in next few days, as the requester gave up on fighting.

The omf project seems to be plagued with copyright problems.

In fact we (omf project) never infringed copyright. But it's how DMCA requests work. You don't need to prove anything and Github takes down your repo to keep safe harbour protection.

Contributor

derekstavis commented Mar 2, 2016

Man, again? I thought they resolved this.

We also thought this was solved, but then we got striked again by dirty competition. Github should be freeing our repository in next few days, as the requester gave up on fighting.

The omf project seems to be plagued with copyright problems.

In fact we (omf project) never infringed copyright. But it's how DMCA requests work. You don't need to prove anything and Github takes down your repo to keep safe harbour protection.

@passcod

This comment has been minimized.

Show comment
Hide comment
@passcod

passcod Mar 2, 2016

Contributor

Yes, apologies. I really meant to say "DMCA requests" but left it as is because I didn't remember what had happened and left to research it. Then I got bored of reading about douchenozzles, but let's not hijack this thread further.

Outside people looking to use omf: find someone who already has an install and ask them for a tarball or git clone or something. Git is distributed, yay.

Contributor

passcod commented Mar 2, 2016

Yes, apologies. I really meant to say "DMCA requests" but left it as is because I didn't remember what had happened and left to research it. Then I got bored of reading about douchenozzles, but let's not hijack this thread further.

Outside people looking to use omf: find someone who already has an install and ask them for a tarball or git clone or something. Git is distributed, yay.

@derekstavis

This comment has been minimized.

Show comment
Hide comment
@derekstavis

derekstavis Mar 2, 2016

Contributor

Sorry if I sounded gross @passcod, I was affected by such a hard time in Oh My Fish. But well.. Now we are back!!

Contributor

derekstavis commented Mar 2, 2016

Sorry if I sounded gross @passcod, I was affected by such a hard time in Oh My Fish. But well.. Now we are back!!

@shangsunset

This comment has been minimized.

Show comment
Hide comment
@shangsunset

shangsunset Apr 14, 2016

Fish shell noob here. while function nvm bass source ~/.nvm/nvm.sh ';' nvm $argv end makes nvm work in fish, installed node and npm wont work properly until i execute a nvm command. How to make them available on shell startup? Thanks.

shangsunset commented Apr 14, 2016

Fish shell noob here. while function nvm bass source ~/.nvm/nvm.sh ';' nvm $argv end makes nvm work in fish, installed node and npm wont work properly until i execute a nvm command. How to make them available on shell startup? Thanks.

@derekstavis

This comment has been minimized.

Show comment
Hide comment
@derekstavis

derekstavis Apr 14, 2016

Contributor

Hey @shangsunset, install nvm wrapper via Oh My Fish and forget about issues. It will also allow you to use completions. Give a look at https://github.com/derekstavis/plugin-nvm

Contributor

derekstavis commented Apr 14, 2016

Hey @shangsunset, install nvm wrapper via Oh My Fish and forget about issues. It will also allow you to use completions. Give a look at https://github.com/derekstavis/plugin-nvm

@shangsunset

This comment has been minimized.

Show comment
Hide comment
@shangsunset

shangsunset Apr 14, 2016

@derekjkeller yea. i was using fisherman at first. ended up switching to oh-my-fish and your plugin-nvm works perfectly :)

shangsunset commented Apr 14, 2016

@derekjkeller yea. i was using fisherman at first. ended up switching to oh-my-fish and your plugin-nvm works perfectly :)

@derekstavis

This comment has been minimized.

Show comment
Hide comment
@derekstavis

derekstavis Apr 14, 2016

Contributor

Awesome @shangsunset, I hope you like the plugin. Feel free to file a bug if you find any issue 👍

Contributor

derekstavis commented Apr 14, 2016

Awesome @shangsunset, I hope you like the plugin. Feel free to file a bug if you find any issue 👍

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 16, 2016

Someone reading this thread in the future will be seriously misdirected, so let me fix that.

The reason @shangsunset was having trouble with nvm has nothing to do with fisherman or omf, but incorrect nvm usage.

got bass?

In fish, there are a few ways to run nvm, IMO the best way to go about this is using bass, which lets you run (not just nvm, but also other) non-fish env-altering scripts and have your fish env/vars altered accordingly.

You don't even need fisherman / omf to do any of this.

how??

Create a dummy nvm function (save it to ~/.config/fish/functions/nvm.fish)

function nvm
    bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv
end

Run this function at the start of your shell session _every time_ (or when you cd into a directory with a .nvmrc). If you don't do this, you won't be able to run node or npm since they will _not_ be in your $PATH.

okay, but i don't want to run nvm every time

If you don't want to run nvm at the start of the shell / or when cd'ing into a path with .nvmrc, then just add this to your ~/.config/fish/config.fish:

bass source ~/.nvm/nvm.sh --no-use ';' nvm

Related edc/bass#28

ghost commented Apr 16, 2016

Someone reading this thread in the future will be seriously misdirected, so let me fix that.

The reason @shangsunset was having trouble with nvm has nothing to do with fisherman or omf, but incorrect nvm usage.

got bass?

In fish, there are a few ways to run nvm, IMO the best way to go about this is using bass, which lets you run (not just nvm, but also other) non-fish env-altering scripts and have your fish env/vars altered accordingly.

You don't even need fisherman / omf to do any of this.

how??

Create a dummy nvm function (save it to ~/.config/fish/functions/nvm.fish)

function nvm
    bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv
end

Run this function at the start of your shell session _every time_ (or when you cd into a directory with a .nvmrc). If you don't do this, you won't be able to run node or npm since they will _not_ be in your $PATH.

okay, but i don't want to run nvm every time

If you don't want to run nvm at the start of the shell / or when cd'ing into a path with .nvmrc, then just add this to your ~/.config/fish/config.fish:

bass source ~/.nvm/nvm.sh --no-use ';' nvm

Related edc/bass#28

@jethrokuan

This comment has been minimized.

Show comment
Hide comment
@jethrokuan

jethrokuan Apr 16, 2016

Minor correction: a .nvmrc in the directory does not guarantee that node or npm is added into the path upon entering the directory. nvm use reads from it if no node version is specified in the command.

While it is good that you got it working, knowing what goes on under the hood is also essential in debugging problems you might face in the future.

jethrokuan commented Apr 16, 2016

Minor correction: a .nvmrc in the directory does not guarantee that node or npm is added into the path upon entering the directory. nvm use reads from it if no node version is specified in the command.

While it is good that you got it working, knowing what goes on under the hood is also essential in debugging problems you might face in the future.

@derekjkeller

This comment has been minimized.

Show comment
Hide comment
@derekjkeller

derekjkeller Apr 19, 2016

Contributor

@shangsunset wrong derek referenced in your comment earlier, but he obviously saw it.

Contributor

derekjkeller commented Apr 19, 2016

@shangsunset wrong derek referenced in your comment earlier, but he obviously saw it.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 27, 2016

Hi again and thanks to @ljharb for merging b0693f2.

Running nvm in fish can be laborious, so I wrote an nvm_-like_ node version manager in fish: fin.

ghost commented Apr 27, 2016

Hi again and thanks to @ljharb for merging b0693f2.

Running nvm in fish can be laborious, so I wrote an nvm_-like_ node version manager in fish: fin.

@danielb2

This comment has been minimized.

Show comment
Hide comment
@danielb2

danielb2 Jan 27, 2017

Contributor

I just use

#!/bin/bash

export NVM_SYMLINK_CURRENT=true

if [[ -s $HOME/.nvm/nvm.sh ]] ;
  then
    source $HOME/.nvm/nvm.sh;
  else
    echo "No nvm found in `$HOME/.nvm/nvm.sh`";
fi

nvm $@

And then add /usr/local/sbin $HOME/.nvm/current/bin to my path. This is why I implemented the NVM_SYMLINK_CURRENT variable for nvm in the first place

Contributor

danielb2 commented Jan 27, 2017

I just use

#!/bin/bash

export NVM_SYMLINK_CURRENT=true

if [[ -s $HOME/.nvm/nvm.sh ]] ;
  then
    source $HOME/.nvm/nvm.sh;
  else
    echo "No nvm found in `$HOME/.nvm/nvm.sh`";
fi

nvm $@

And then add /usr/local/sbin $HOME/.nvm/current/bin to my path. This is why I implemented the NVM_SYMLINK_CURRENT variable for nvm in the first place

@eugenet8k

This comment has been minimized.

Show comment
Hide comment

eugenet8k commented Aug 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment