Show node version in PowerShell prompt
I use nvm for Windows so I can quickly used different versions of node.js as my different projects demand. I’ve got burnt a couple of times using the wrong version for a given project though. I figured it would be helpful to always know which version I’m on without having to run node -v
so I’ve added it to my shell prompt, which already shows the current time.
I updated my powershell profile with the customization below. I’m using posh-git so it was pretty easy to do with a helper function.