Changes:
- nodenv and nvm now honors (and prioritizes) `$XDG_CONFIG_HOME` over
`$HOME` to lookup local nodenv/nvm installation.
- Make `nvm` loading lazy (via `--no-use` argument).
- Remove redundant NODENV_ROOT or NVM_DIR, respective script already
set them up.
- Adhere to more idiomatic Zsh operation and minimize external command
usage (like `sed`).
In homebrewed environment, avoid using `brew --prefix nvm` which is
ruby based and is super slow. Instead, rely on homebrew standard
behavior wherein all installed packages are available in canonical
path $(brew --prefix)/opt/<package> (for nvm it would obviously be
`$(brew --prefix)/opt/nvm`).
NB: `$(brew --prefix)` (without additional argument) is a simple shell
shortcut and doesn't have the same performance impact.
This change fixes a bug where no command can be found
(e.g. `ls`) due to the $path array being set to two elements,
one of them with all the previous paths separated by spaces.
This makes zsh break $PATH, instead of colons there are
spaces, and nothing works.
The idea is to have the array be set leveraging the word splitting
that we usually are told to avoid by quoting.