7
2
I am trying to manage my packages for OSX using Homebrew as much a I can. I have installed both the Fish Shell and NVM using Homebrew but cannot get Fish to recognize my NVM installation. NVM commands are run fine when run with Bash, probably because when you install NVM using Homebrew it had me add some extra lines to my .bashrc file.
After installing NVM with Homebrew it says to:
Add NVM's working directory to your $HOME path (if it doesn't exist):
mkdir ~/.nvm
Add the following to $HOME/.bashrc, $HOME/.zshrc, or your shell's
equivalent configuration file:
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
Also it appears the Homebrew install script has added this line to my ~/.profile
source /usr/local/opt/nvm/nvm.sh
I hope that it would be possible to use this same technique with Fish to also gain access to the NVM installation, but I cannot seem to get this to work.
I have found this technique: https://github.com/passcod/nvm-fish-wrapper But I would rather not have to wrap NVM.
Can anyone help?
You have to either wrap nvm or create /usr/local/opt/nvm/nvm.fish. fish is a different language than sh, so you have to do something to get nvm to emit fish syntax – glenn jackman – 2015-04-23T16:00:28.360
Ahhh I see that makes sense, I completely missed that. I will just use the fish wrapper then or just install NVM not using homebrew. Thank you @glennjackman ! – Sam – 2015-04-23T16:24:45.847