-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to show current Node.js version #128
base: master
Are you sure you want to change the base?
Conversation
Is this going to be merged? |
In all the other "version" segments (virtualenv, rvm, etc) the segment isn't showing the current version of the language, it's showing the current state of the virtual environment. That this happens to show the language version is a bit irrelevant. For this to be consistent with those, it would probably show the version supplied by NVM (or other node environment manager), along with any equivalent to ruby bundles. Additionally, if the current environment version is the "system" or "default", the other language segments don't show at all. This is in keeping with the bobthefish principle that default states should be omitted whenever possible, so that emphasis is placed on what is different, not what is always the same. So to move forward with this… What is setting your node version? |
I think the best option would be to use the active NVM version. |
__bobthefish_start_segment $__color_node | ||
set -l node_version (node --version) | ||
echo -ns $__bobthefish_node_glyph | ||
echo -ns $white $node_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does $white
come from?
@@ -1225,6 +1242,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome' | |||
set __color_rvm $red $grey --bold | |||
set __color_virtualfish $blue $grey --bold | |||
set __color_virtualgo $blue $grey --bold | |||
set __color_node 026e00 $colorfg --bold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no $colorfg
here.
@@ -1448,6 +1470,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome' | |||
set __color_rvm $ruby_red $grey[1] --bold | |||
set __color_virtualfish $blue[2] $grey[1] --bold | |||
set __color_virtualgo $blue[2] $grey[1] --bold | |||
set __color_node 026e00 $colorfg --bold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no $colorfg
here.
@@ -1486,6 +1509,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome' | |||
set __color_rvm $red[2] $fg[2] --bold | |||
set __color_virtualfish $blue[2] $fg[2] --bold | |||
set __color_virtualgo $blue[2] $fg[2] --bold | |||
set __color_node 026e00 $colorfg --bold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no $colorfg
here.
@@ -1525,6 +1549,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome' | |||
set __color_rvm $ruby_red $grey[1] --bold | |||
set __color_virtualfish $blue[2] $grey[1] --bold | |||
set __color_virtualgo $blue[2] $grey[1] --bold | |||
set __color_node 026e00 $colorfg --bold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no $colorfg
here.
Possible fix for #97