tide/functions/_tide_cache_variables.fish

25 lines
869 B
Fish
Raw Normal View History

2021-08-22 01:05:08 +03:00
function _tide_cache_variables
# pwd
2021-09-09 04:15:45 +03:00
set_color -o $tide_pwd_color_anchors | read -gx _tide_color_anchors
2021-09-17 21:10:16 +03:00
set -gx _tide_color_truncated_dirs "$(set_color $tide_pwd_color_truncated_dirs)"
2021-08-22 01:05:08 +03:00
set -gx _tide_reset_to_color_dirs (set_color normal -b $tide_pwd_bg_color; set_color $tide_pwd_color_dirs)
# git
contains git $tide_left_prompt_items $tide_right_prompt_items &&
2021-09-17 21:10:16 +03:00
set -gx _tide_location_color "$(set_color $tide_git_color_branch)"
2021-08-22 01:05:08 +03:00
# two line prompt
2021-09-15 20:16:36 +03:00
if contains newline $tide_left_prompt_items
2021-09-09 04:15:45 +03:00
set_color $tide_prompt_color_frame_and_connection -b normal | read -gx _tide_prompt_and_frame_color
2021-09-15 20:16:36 +03:00
else
set -e _tide_prompt_and_frame_color
end
2021-08-22 01:05:08 +03:00
# newline before
2021-09-15 20:16:36 +03:00
if test "$tide_prompt_add_newline_before" = true
set -g _tide_add_newline ''
else
set -e _tide_add_newline
end
2021-08-22 01:05:08 +03:00
end