Hide k8s context or namespace when they are 'default'

Kept the : prefix for the namespace to denote that it is in fact a namespace and
not a context when context is default and thus down hidden.
pull/338/head
Taylor Lawson 1 year ago
parent 2dcfcab653
commit 0b1686c5d2
No known key found for this signature in database
GPG Key ID: DE21BF2F713C3D28

@ -641,8 +641,10 @@ function __bobthefish_prompt_k8s_context -S -d 'Show current Kubernetes context'
and [ -z $namespace -o "$namespace" = 'default' ]
and return
set -l segment $k8s_glyph ' ' $context
[ -n "$namespace" ]
set -l segment $k8s_glyph ' '
[ "$context" != 'default' ]
and set segment $segment $context
[ "$namespace" != 'default' ]
and set segment $segment ':' $namespace
__bobthefish_start_segment $color_k8s

Loading…
Cancel
Save