mirror of
https://github.com/IlanCosman/tide.git
synced 2024-10-26 10:44:21 +03:00
Minor edits
This commit is contained in:
parent
e2f594cde1
commit
24a83c3098
@ -1,6 +1,6 @@
|
|||||||
function _tide_cache_variables
|
function _tide_cache_variables
|
||||||
# pwd
|
# 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_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)
|
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
|
# two line prompt
|
||||||
contains newline $tide_left_prompt_items &&
|
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
|
# newline before
|
||||||
set -e _tide_add_newline
|
set -e _tide_add_newline
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
function _tide_find_and_remove -a name list --no-scope-shadowing
|
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
|
end
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
function _tide_item_kubectl
|
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)
|
_tide_print_item kubectl $tide_kubectl_icon' ' (string replace --regex '/(|default)$' '' $context)
|
||||||
end
|
end
|
||||||
|
@ -13,7 +13,7 @@ function _tide_pwd
|
|||||||
if test -n "$split_pwd[1]" # ~/foo/bar, hightlight ~
|
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..]
|
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
|
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
|
end
|
||||||
set split_pwd_for_output[-1] $_tide_color_anchors$split_pwd[-1]$_tide_reset_to_color_dirs
|
set split_pwd_for_output[-1] $_tide_color_anchors$split_pwd[-1]$_tide_reset_to_color_dirs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user