caiogondim / bullet-train.zsh

:bullettrain_side: An oh-my-zsh shell theme based on the Powerline Vim plugin
MIT License
2.82k stars 383 forks source link

Drop nvm use and rename prompt_nvm to prompt_node #135

Open faceleg opened 8 years ago

faceleg commented 8 years ago

This issue is for discussion and planning.

As proven in https://github.com/caiogondim/bullet-train-oh-my-zsh-theme/pull/133, nvm is not required to get the current environment's node version.

drwpow commented 7 years ago

Also wanted to add BULLETRAIN_NVM_SHOW, et al work just fine for nodenv (rbenv for Node). It’s not a major issue, but as suggested, naming it something more generic like NODE would be a little more straightforward.

FrederickGeek8 commented 6 years ago

There is a subtlety to this issue. NVM is not required to get node version if NVM is loaded. There can arise a situation when trying to lazy-load plugins for performance enhancement which results in NVM only becoming loaded when a command like node or nvm is executed.

This is something I address in my pull request #274 . One problem with this observation is that if you are trying to lazy-load nvm and were to use a implementation that would just run node --version, then NVM would be loaded into the shell, thus defeating the purpose of lazy-loading.