diff --git a/functions/__bobthefish_prompt_k8s_color.fish b/functions/__bobthefish_prompt_k8s_color.fish new file mode 100644 index 0000000..02871d1 --- /dev/null +++ b/functions/__bobthefish_prompt_k8s_color.fish @@ -0,0 +1,5 @@ +function __bobthefish_prompt_k8s_color -S -d 'Determine Kubernetes prompt color based on the current context and namespace' + for i in $color_k8s + echo $i + end +end diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 02bfe97..cee8b61 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -645,11 +645,10 @@ function __bobthefish_prompt_k8s_context -S -d 'Show current Kubernetes context' [ -n "$namespace" ] and set segment $segment ':' $namespace - __bobthefish_start_segment $color_k8s + __bobthefish_start_segment (__bobthefish_prompt_k8s_color $context $namespace) echo -ns $segment ' ' end - # ============================== # Cloud Tools # ==============================