Really does not like ZSH #151

Closed
balupton opened this Issue Oct 11, 2012 · 8 comments

Comments

Projects
None yet
4 participants
@balupton

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
@balupton

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Oct 11, 2012

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

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

@balupton

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Oct 11, 2012

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 :)

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 :)

@balupton

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Oct 16, 2012

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...

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...

@rodowi

This comment has been minimized.

Show comment
Hide comment
@rodowi

rodowi Oct 19, 2012

hey @balupton did you manage to fix it?

rodowi commented Oct 19, 2012

hey @balupton did you manage to fix it?

@balupton

This comment has been minimized.

Show comment
Hide comment
@balupton

balupton Oct 19, 2012

Nope, went back to bash.

Nope, went back to bash.

@rodowi

This comment has been minimized.

Show comment
Hide comment
@rodowi

rodowi Oct 19, 2012

alright then, forking...

rodowi commented Oct 19, 2012

alright then, forking...

@mmacedo

This comment has been minimized.

Show comment
Hide comment
@mmacedo

mmacedo Jul 28, 2013

@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

mmacedo commented Jul 28, 2013

@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
@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb May 4, 2014

Collaborator

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

Collaborator

ljharb commented May 4, 2014

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

@ljharb ljharb closed this May 4, 2014

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