mirror of
https://github.com/IlanCosman/tide.git
synced 2024-11-22 23:03:26 +03:00
Add chruby item (#100)
* Add ruby item * Rename chruby test Co-authored-by: Ilan Cosman <ilancosman@gmail.com>
This commit is contained in:
parent
953203adcf
commit
4f621eae3f
6
functions/_tide_item_chruby.fish
Normal file
6
functions/_tide_item_chruby.fish
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
function _tide_item_chruby
|
||||||
|
if test -n "$RUBY_VERSION"
|
||||||
|
set_color $tide_chruby_color
|
||||||
|
printf '%s' $tide_chruby_icon' ' $RUBY_VERSION
|
||||||
|
end
|
||||||
|
end
|
@ -64,10 +64,13 @@ tide_right_prompt_frame_enabled true
|
|||||||
tide_right_prompt_item_separator_diff_color ''
|
tide_right_prompt_item_separator_diff_color ''
|
||||||
tide_right_prompt_item_separator_same_color ''
|
tide_right_prompt_item_separator_same_color ''
|
||||||
tide_right_prompt_item_separator_same_color_color 949494
|
tide_right_prompt_item_separator_same_color_color 949494
|
||||||
tide_right_prompt_items 'status' 'cmd_duration' 'context' 'jobs' 'nvm' 'virtual_env' 'rust' 'php' 'vi_mode'
|
tide_right_prompt_items 'status' 'cmd_duration' 'context' 'jobs' 'nvm' 'virtual_env' 'rust' 'php' 'vi_mode' 'chruby'
|
||||||
tide_right_prompt_pad_items true
|
tide_right_prompt_pad_items true
|
||||||
tide_right_prompt_prefix ''
|
tide_right_prompt_prefix ''
|
||||||
tide_right_prompt_suffix ''
|
tide_right_prompt_suffix ''
|
||||||
|
tide_chruby_bg_color CC342D
|
||||||
|
tide_chruby_color white
|
||||||
|
tide_chruby_icon ''
|
||||||
tide_rust_bg_color 444444
|
tide_rust_bg_color 444444
|
||||||
tide_rust_color 00AFAF
|
tide_rust_color 00AFAF
|
||||||
tide_rust_icon ''
|
tide_rust_icon ''
|
||||||
|
@ -33,6 +33,8 @@ tide_pwd_color_dirs cyan
|
|||||||
tide_pwd_color_truncated_dirs magenta
|
tide_pwd_color_truncated_dirs magenta
|
||||||
tide_right_prompt_frame_color brblack
|
tide_right_prompt_frame_color brblack
|
||||||
tide_right_prompt_item_separator_same_color_color brblack
|
tide_right_prompt_item_separator_same_color_color brblack
|
||||||
|
tide_chruby_bg_color black
|
||||||
|
tide_chruby_color red
|
||||||
tide_rust_bg_color black
|
tide_rust_bg_color black
|
||||||
tide_rust_color cyan
|
tide_rust_color cyan
|
||||||
tide_status_failure_bg_color black
|
tide_status_failure_bg_color black
|
||||||
|
@ -64,10 +64,13 @@ tide_right_prompt_frame_enabled false
|
|||||||
tide_right_prompt_item_separator_diff_color ' '
|
tide_right_prompt_item_separator_diff_color ' '
|
||||||
tide_right_prompt_item_separator_same_color ' '
|
tide_right_prompt_item_separator_same_color ' '
|
||||||
tide_right_prompt_item_separator_same_color_color 949494
|
tide_right_prompt_item_separator_same_color_color 949494
|
||||||
tide_right_prompt_items 'status' 'cmd_duration' 'context' 'jobs' 'nvm' 'virtual_env' 'rust' 'php'
|
tide_right_prompt_items 'status' 'cmd_duration' 'context' 'jobs' 'nvm' 'virtual_env' 'rust' 'php' 'chruby'
|
||||||
tide_right_prompt_pad_items false
|
tide_right_prompt_pad_items false
|
||||||
tide_right_prompt_prefix ' '
|
tide_right_prompt_prefix ' '
|
||||||
tide_right_prompt_suffix ''
|
tide_right_prompt_suffix ''
|
||||||
|
tide_chruby_bg_color normal
|
||||||
|
tide_chruby_color CC342D
|
||||||
|
tide_chruby_icon ''
|
||||||
tide_rust_bg_color normal
|
tide_rust_bg_color normal
|
||||||
tide_rust_color 00AFAF
|
tide_rust_color 00AFAF
|
||||||
tide_rust_icon ''
|
tide_rust_icon ''
|
||||||
|
@ -33,6 +33,8 @@ tide_pwd_color_dirs cyan
|
|||||||
tide_pwd_color_truncated_dirs magenta
|
tide_pwd_color_truncated_dirs magenta
|
||||||
tide_right_prompt_frame_color brblack
|
tide_right_prompt_frame_color brblack
|
||||||
tide_right_prompt_item_separator_same_color_color brblack
|
tide_right_prompt_item_separator_same_color_color brblack
|
||||||
|
tide_chruby_bg_color normal
|
||||||
|
tide_chruby_color red
|
||||||
tide_rust_bg_color normal
|
tide_rust_bg_color normal
|
||||||
tide_rust_color cyan
|
tide_rust_color cyan
|
||||||
tide_status_failure_bg_color normal
|
tide_status_failure_bg_color normal
|
||||||
|
@ -64,10 +64,13 @@ tide_right_prompt_frame_enabled true
|
|||||||
tide_right_prompt_item_separator_diff_color ''
|
tide_right_prompt_item_separator_diff_color ''
|
||||||
tide_right_prompt_item_separator_same_color ''
|
tide_right_prompt_item_separator_same_color ''
|
||||||
tide_right_prompt_item_separator_same_color_color 949494
|
tide_right_prompt_item_separator_same_color_color 949494
|
||||||
tide_right_prompt_items 'status' 'cmd_duration' 'context' 'jobs' 'nvm' 'virtual_env' 'rust' 'php' 'vi_mode'
|
tide_right_prompt_items 'status' 'cmd_duration' 'context' 'jobs' 'nvm' 'virtual_env' 'rust' 'php' 'vi_mode' 'chruby'
|
||||||
tide_right_prompt_pad_items true
|
tide_right_prompt_pad_items true
|
||||||
tide_right_prompt_prefix ''
|
tide_right_prompt_prefix ''
|
||||||
tide_right_prompt_suffix ''
|
tide_right_prompt_suffix ''
|
||||||
|
tide_chruby_bg_color CC342D
|
||||||
|
tide_chruby_color white
|
||||||
|
tide_chruby_icon ''
|
||||||
tide_rust_bg_color FF8700
|
tide_rust_bg_color FF8700
|
||||||
tide_rust_color 2E3436
|
tide_rust_color 2E3436
|
||||||
tide_rust_icon ''
|
tide_rust_icon ''
|
||||||
|
@ -33,6 +33,8 @@ tide_pwd_color_dirs brwhite
|
|||||||
tide_pwd_color_truncated_dirs white
|
tide_pwd_color_truncated_dirs white
|
||||||
tide_right_prompt_frame_color brblack
|
tide_right_prompt_frame_color brblack
|
||||||
tide_right_prompt_item_separator_same_color_color brblack
|
tide_right_prompt_item_separator_same_color_color brblack
|
||||||
|
tide_chruby_bg_color red
|
||||||
|
tide_chruby_color black
|
||||||
tide_rust_bg_color yellow
|
tide_rust_bg_color yellow
|
||||||
tide_rust_color black
|
tide_rust_color black
|
||||||
tide_status_failure_bg_color red
|
tide_status_failure_bg_color red
|
||||||
|
14
tests/_tide_item_chruby.test.fish
Normal file
14
tests/_tide_item_chruby.test.fish
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# RUN: %fish %s
|
||||||
|
|
||||||
|
function _chruby
|
||||||
|
_tide_decolor (_tide_item_chruby)
|
||||||
|
end
|
||||||
|
|
||||||
|
set -lx RUBY_VERSION
|
||||||
|
|
||||||
|
_chruby # CHECK:
|
||||||
|
|
||||||
|
set -lx RUBY_VERSION 3.0.0
|
||||||
|
set -lx tide_chruby_icon
|
||||||
|
|
||||||
|
_chruby # CHECK: 3.0.0
|
Loading…
Reference in New Issue
Block a user