Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Really does not like ZSH #151

Closed
balupton opened this Issue · 8 comments

4 participants

Benjamin Lupton Rod Wilhelmy Michel Pavan Macedo Jordan Harband
Benjamin Lupton

Whatever I do, just can't get nvm working with zsh :(

[balupton@balair:~ on master]
% ls ~/.nvm/nvm.sh                                                                                                                                                                                        ✹
/Users/balupton/.nvm/nvm.sh
[balupton@balair:~ on master]
% . ~/.nvm/nvm.sh                                                                                                                                                                                         ✹
cd:cd:10: no such file or directory: ^[]7;file:///Users/balupton/.nvm^G/Users/balupton/.nvm
Benjamin Lupton

Seems these lines are to blame:

# Auto detect the NVM_DIR
if [ ! -d "$NVM_DIR" ]; then
    export NVM_DIR=$(cd $(dirname ${BASH_SOURCE[0]:-$0}) && pwd)
fi

removing them, no errors... but can't find any installed versions

Benjamin Lupton

Cool, changing:

# NVM
if [ -s ~/.nvm/nvm.sh ]; then
    source ~/.nvm/nvm.sh
fi

to:

# NVM
if [ -s ~/.nvm/nvm.sh ]; then
    NVM_DIR=~/.nvm
    source ~/.nvm/nvm.sh
fi

in my rc file worked :)

Benjamin Lupton

Busted on my iMac...

[balupton@iMac:~/.nvm on master]
% nvm use 0.8
v0.8.12 version is not installed yet

[balupton@iMac:~/.nvm on master]
% nvm ls
v0.8.12
current:    
default -> 0.8.12 (-> v0.8.12)

[balupton@iMac:~/.nvm on master]
% nvm install 0.8.12
zsh: correct '0.8.12' to 'v0.8.12' [nyae]? n
v0.8.12 is already installed.

[balupton@iMac:~/.nvm on master]
% echo $PATH
/Users/balupton/.rvm/gems/ruby-1.9.3-p125/bin:/Users/balupton/.rvm/gems/ruby-1.9.3-p125@global/bin:/Users/balupton/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/balupton/.rvm/bin:/Users/balupton/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/heroku/bin

[balupton@iMac:~/.nvm on master]
% bash
n10:22:33:balupton@iMac.local:/Users/balupton/.nvm:master$ nvm use 0.8
Now using node v0.8.12

bash works fine...

Rod Wilhelmy

hey @balupton did you manage to fix it?

Benjamin Lupton

Nope, went back to bash.

Rod Wilhelmy

alright then, forking...

Michel Pavan Macedo

@balupton Assuming there isn't a solution yet, since the issue is still open, instead of quitting zsh you can use this script. It was based on this other one for fish.

. source.zsh
source_bash ~/.nvm/nvm.sh
Jordan Harband
Collaborator

nvm works fine now in zsh, and tests run in it. Please file issues if you have any problems with nvm in zsh

Jordan Harband ljharb closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.