Minor edits

This commit is contained in:
Ilan Cosman 2021-09-08 18:15:45 -07:00
parent e2f594cde1
commit 24a83c3098
4 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
function _tide_cache_variables
# pwd
set -gx _tide_color_anchors (set_color -o $tide_pwd_color_anchors)
set_color -o $tide_pwd_color_anchors | read -gx _tide_color_anchors
set -gx _tide_color_truncated_dirs (set_color $tide_pwd_color_truncated_dirs || echo)
set -gx _tide_reset_to_color_dirs (set_color normal -b $tide_pwd_bg_color; set_color $tide_pwd_color_dirs)
@ -10,7 +10,7 @@ function _tide_cache_variables
# two line prompt
contains newline $tide_left_prompt_items &&
set -gx _tide_prompt_and_frame_color (set_color $tide_prompt_color_frame_and_connection -b normal)
set_color $tide_prompt_color_frame_and_connection -b normal | read -gx _tide_prompt_and_frame_color
# newline before
set -e _tide_add_newline

View File

@ -1,3 +1,3 @@
function _tide_find_and_remove -a name list --no-scope-shadowing
set -l index (contains --index $name $$list) && set -e "$list"[$index]
contains --index $name $$list | read -l index && set -e "$list"[$index]
end

View File

@ -1,4 +1,4 @@
function _tide_item_kubectl
set -l context (kubectl config view --minify --output 'jsonpath={.current-context}/{..namespace}' 2>/dev/null) &&
kubectl config view --minify --output 'jsonpath={.current-context}/{..namespace}' 2>/dev/null | read -l context &&
_tide_print_item kubectl $tide_kubectl_icon' ' (string replace --regex '/(|default)$' '' $context)
end

View File

@ -13,7 +13,7 @@ function _tide_pwd
if test -n "$split_pwd[1]" # ~/foo/bar, hightlight ~
set split_pwd_for_output "$_tide_reset_to_color_dirs$tide_pwd_icon"$_tide_color_anchors$split_pwd[1]$_tide_reset_to_color_dirs $split_pwd[2..]
else # /foo/bar, hightlight foo not empty string
set split_pwd_for_output "$_tide_reset_to_color_dirs$tide_pwd_icon"'' $_tide_color_anchors$split_pwd[2]$_tide_reset_to_color_dirs $split_pwd[3..]
set split_pwd_for_output "$_tide_reset_to_color_dirs$tide_pwd_icon" $_tide_color_anchors$split_pwd[2]$_tide_reset_to_color_dirs $split_pwd[3..]
end
set split_pwd_for_output[-1] $_tide_color_anchors$split_pwd[-1]$_tide_reset_to_color_dirs