export NVM_DIR="$HOME/.nvm"
function loadNvm() {
  [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
}
# careful: bash completion can't be lazily loaded or otherwise it will not work!
# (maybe there is a trick to do that but it needs further investigations...)
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
loadNvm &
          Last active
          July 21, 2023 16:43 
        
      - 
      
 - 
        
Save gturi/bc26e966ed472e70b5f7ee9038db55f8 to your computer and use it in GitHub Desktop.  
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
https://dev.to/zanehannanau/bash-lazy-completion-evaluation-2a2d