Source custom.zsh
in your zsh profile, then in iTerm 2 go to Preferences -> Profiles -> Session
, and under Miscellaneous check "Status bar enabled" then click "Configure Status Bar".
Add an Interpolated String component, then configure the String Value to be \(user.nodeVersion)
(adjust to match the name of the variable set in iterm2_print_user_vars()
, if different)
Now when you load a new session with the configured profile, the Status Bar will show "unset" until node is loaded from nvm, and will show the correct version whenever nvm use
is called.