mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2025-06-13 13:03:54 +00:00
Show node version on yes for files and always for always
This breaks the previous behaviour where yes would always show it, regardless of the directory.
This commit is contained in:
parent
6d817d97b8
commit
ca9e78068a
@ -124,7 +124,7 @@ set -g theme_newline_prompt '$ '
|
|||||||
**Prompt options**
|
**Prompt options**
|
||||||
|
|
||||||
- `theme_display_ruby`. Use `no` to completely hide all information about Ruby version. By default Ruby version displayed if there is the difference from default settings.
|
- `theme_display_ruby`. Use `no` to completely hide all information about Ruby version. By default Ruby version displayed if there is the difference from default settings.
|
||||||
- `theme_display_node`. If set to `yes`, will display current NVM or FNM node version. If set to `rc`, will display the version if an `.nvmrc` or `.node-version` file is found. If set to `package`, will display the version if a `package.json` file is found.
|
- `theme_display_node`. If set to `always`, will display current NPM, NVM or FNM node version. If set to `yes`, will display the version if an `.nvmrc`, `.node-version` or `package.json` file is found in the parent directories.
|
||||||
- `theme_display_vagrant`. This feature is disabled by default, use `yes` to display Vagrant status in your prompt. Please note that only the VirtualBox and VMWare providers are supported.
|
- `theme_display_vagrant`. This feature is disabled by default, use `yes` to display Vagrant status in your prompt. Please note that only the VirtualBox and VMWare providers are supported.
|
||||||
- `theme_display_vi`. By default the vi mode indicator will be shown if vi or hybrid key bindings are enabled. Use `no` to hide the indicator, or `yes` to show the indicator.
|
- `theme_display_vi`. By default the vi mode indicator will be shown if vi or hybrid key bindings are enabled. Use `no` to hide the indicator, or `yes` to show the indicator.
|
||||||
- `theme_display_k8s_context`. This feature is disabled by default. Use `yes` to show the current kubernetes context (`> kubectl config current-context`).
|
- `theme_display_k8s_context`. This feature is disabled by default. Use `yes` to show the current kubernetes context (`> kubectl config current-context`).
|
||||||
|
@ -916,15 +916,10 @@ end
|
|||||||
function __bobthefish_prompt_node -S -d 'Display current node version'
|
function __bobthefish_prompt_node -S -d 'Display current node version'
|
||||||
set -l should_show
|
set -l should_show
|
||||||
|
|
||||||
if [ "$theme_display_node" = 'yes' -o "$theme_display_nvm" = 'yes' ]
|
if [ "$theme_display_node" = 'always' -o "$theme_display_nvm" = 'yes' ]
|
||||||
set should_show 1
|
set should_show 1
|
||||||
else if [ "$theme_display_node" = 'rc' ]
|
else if [ "$theme_display_node" = 'yes' ]
|
||||||
begin
|
__bobthefish_prompt_find_file_up_re "$PWD" '\.nvmrc|\.node-version|package\.json'
|
||||||
__bobthefish_prompt_find_file_up_re "$PWD" '\.nvmrc|\.node-version'
|
|
||||||
end
|
|
||||||
and set should_show 1
|
|
||||||
else if [ "$theme_display_node" = 'package' ]
|
|
||||||
__bobthefish_prompt_find_file_up_re "$PWD" 'package\.json'
|
|
||||||
and set should_show 1
|
and set should_show 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user