bash-it/themes
Konstantin Gredeskoul b935ddd309
`node_version_prompt` should work without NVM
Adding `node` prompt that does not depend on `nvm` and will work with other version managers as well.

There are now alternative version managers available, such as a much more streamlined [volta.sh](https://volta.sh).  It feels like a deja-vu of `rvm` to `rbenv` switch, all over again.

Regardless, we should be able to show the current `node` version whether you are using NVM, VOLTA or a hot potato.

I decided not to add dedicated PREFIX variables for now, but it can be done later.

We still check if `nvm` prompt returns something first because the `declare` check is practically free, and if it returns something — we use it. Only if the output of NVM is blank do we use the new function to grab the version of NodeJS.

There is a caveat — if `node` is installed with the OS, eg `/usr/bin/node` the new function will now pick up the version of that "system" node and show it. Therefore "system" node version will now be visible in the prompt of those who added `node` component to their prompt. Personally, I believe this is the correct behavior, because why should we hide the system node version if that's what's available and in the PATH? We shouldn't.  In fact, I think it's rather confusing that previously we wouldn't show the system node version at all.

Tested locally on OS-X/bash:

    * with/without NVM
    * with/without VOLTA
    * with/without system node
2021-09-13 00:27:41 -07:00
..
90210 Add hooks to check .sh and .bash headers - Fixes #1491 (#1765) 2021-01-09 18:02:26 +02:00
agnoster Add hooks to check .sh and .bash headers - Fixes #1491 (#1765) 2021-01-09 18:02:26 +02:00
atomic Disable SC2207 to keep COMPREPLY simple 2021-01-22 18:41:16 +04:00
axin Clean theme axin 2021-01-11 11:41:44 +01:00
bakke Clean bakke 2021-01-16 09:12:06 +01:00
barbuk Add hooks to check .sh and .bash headers - Fixes #1491 (#1765) 2021-01-09 18:02:26 +02:00
binaryanomaly themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
bira Clean bira 2021-01-16 09:12:42 +01:00
bobby Clean bobby 2021-01-16 09:12:59 +01:00
bobby-python Clean bobby 2021-01-16 09:12:59 +01:00
brainy Disable SC2207 to keep COMPREPLY simple 2021-01-22 18:41:16 +04:00
brunton themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
candy Clean candy theme 2021-04-20 01:18:40 +08:00
clean Trivial fix for clean theme 2019-09-13 10:57:01 +02:00
codeword themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
cooperkid Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
cupcake Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
demula Don't call external `uname` when `$OSTYPE` will do (#1911) 2021-08-14 10:20:12 +03:00
dos Added dos theme 2011-04-29 17:56:04 -05:00
doubletime themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
doubletime_multiline refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
doubletime_multiline_pyonly refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
dulcie Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
duru Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
easy Add theme Easy 2021-04-01 00:28:28 +03:00
elixr Add virtual env support for elixr theme 2018-09-10 19:20:22 +05:30
emperor refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
envy fix code review issues. 2020-03-19 21:27:54 +08:00
essential Removed trailing whitespaces 2020-10-29 19:57:14 +02:00
font Update font theme 2017-04-24 10:19:14 -07:00
gallifrey themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
gitline Address some comments. 2020-11-28 19:07:10 -08:00
hawaii50 Removed trailing whitespaces 2020-10-29 19:57:14 +02:00
iterate Guard against unset COLUMNS 2017-06-23 09:12:46 -05:00
kitsune Added credits 2016-12-09 10:40:42 +05:45
liquidprompt Fix EOF 2020-10-29 19:57:14 +02:00
luan refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
mairan themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
mbriggs Fix EOF 2020-10-29 19:57:14 +02:00
metal squash screenshot 2019-01-25 15:00:21 -06:00
minimal Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
modern themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
modern-t themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
modern-time themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
morris Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
n0qorg Removed trailing whitespaces 2020-10-29 19:57:14 +02:00
newin Add a new theme named newin :) 2019-10-12 21:31:21 +08:00
norbu Added norbu theme 2018-06-01 01:17:03 -04:00
nwinkler refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
nwinkler_random_colors Merge pull request #1721 from NoahGorny/docs-remove-themes-readmes 2020-12-14 00:01:30 +02:00
parrot Convert files with spaces and tabs to only spaces 2020-10-29 19:57:14 +02:00
pete refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
powerline feat: add k8s namespace indicator (#1887) 2021-06-10 16:04:56 +03:00
powerline-multiline feat: add k8s namespace indicator (#1887) 2021-06-10 16:04:56 +03:00
powerline-naked feat: add k8s namespace indicator (#1887) 2021-06-10 16:04:56 +03:00
powerline-plain feat: add k8s namespace indicator (#1887) 2021-06-10 16:04:56 +03:00
powerturk Fix EOF 2020-10-29 19:57:14 +02:00
primer refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
pro Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
pure themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
purity cleaned and linted purity theme 2021-03-24 21:39:57 +00:00
radek docs: Remove themes readmes 2020-12-04 17:24:26 +02:00
rainbowbrite Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
ramses themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
rana Don't call external `uname` when `$OSTYPE` will do (#1911) 2021-08-14 10:20:12 +03:00
redline Merge pull request #1721 from NoahGorny/docs-remove-themes-readmes 2020-12-14 00:01:30 +02:00
rjorgenson themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
robbyrussell [robbyrussell theme] Cleaning up bold markup after theme 2020-09-01 13:52:50 -03:00
roderik refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
sexy Set SEXY_THEME_SHOW_PYTHON variable default value 2019-10-12 11:52:53 +02:00
simple fix simple theme 2017-12-28 10:02:13 +01:00
sirup Removed trailing whitespaces 2020-10-29 19:57:14 +02:00
slick themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
standard Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
tonka refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
tonotdo Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
tylenol Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
wanelo refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
zitron Fix bug: themes break global $PROMPT_COMMAND variable 2016-07-07 17:13:00 +09:00
zork themes: Adapt themes to new scm_prompt api 2021-05-16 19:17:02 +03:00
base.theme.bash `node_version_prompt` should work without NVM 2021-09-13 00:27:41 -07:00
colors.theme.bash add that pesky dollar sign 2020-10-01 08:07:18 -07:00
command_duration.theme.bash Adding preexec as a vendored library 2021-01-23 18:31:18 +01:00
githelpers.theme.bash Fix newline and trailing space issues 2020-10-29 19:57:14 +02:00
p4helpers.theme.bash Add priliminary support for perforce SCM 2018-02-14 17:53:09 -08:00