Posted By

LucasRinaldi on 10/05/12


Tagged


Versions (?)

Sourcing NVM, adding NVM Tab Completion and NPM Tab Completion


 / Published in: Bash
 

This commands works considering that you are on a linux terminal. Change the variable $NVM_HOME to the path that your NVM is installed.

  1. # NVM
  2. export NVM_HOME="$HOME/.nvm"
  3. if [[ -f "$NVM_HOME/nvm.sh" ]]; then
  4. source "$NVM_HOME/nvm.sh"
  5. fi
  6.  
  7. # NVM TAB COMPLETION
  8. if [[ -f "$NVM_HOME/bash_completion" ]]; then
  9. source "$NVM_HOME/bash_completion"
  10. fi
  11.  
  12. # NPM TAB COMPLETION
  13. if npm -v >/dev/null 2>&1; then
  14. . <(npm completion)
  15. fi

Report this snippet  

You need to login to post a comment.