creationix/nvm — pull request #384 by dohse (2014-03-20 23:57:50+00:00)
Title: Zsh nvm dir

In zsh nvm fails to deduce nvm's directory from nvm.sh, because
`$BASH_SOURCE` is not present in zsh. Use the directory of `$0`, if its
filename is `nvm.sh`. We use `$BASH_SOUCE` in bash, `$0` in zsh (and
similar) and fallback to `~/.nvm` otherwise.

Reopening of #369