creationix/nvm — pull request #374 by koenpunt (2014-03-16 17:00:58+00:00)
Title: Fix NVM_DIR discovery

This is the opposite of what is done in 9a0c2697137a72b1d7e3aba502654bcee3d2c881 previously.

But I think it wasn't clear what was happening there.

The change then required `$BASH_SOURCE` to be set and otherwise fallback to `$HOME/.nvm`.

But the part `${BASH_SOURCE[0]:-$0}` already tries `$BASH_SOURCE[0]` first and if not present falls back to `$0`, which is the equivalent of `$BASH_SOURCE` for zsh.

This fixes #333