don't display kubecontext namespace if it's literally 'default'

pull/217/head
romkatv 5 years ago
parent 4313c36df9
commit ca49498cb6

@ -631,7 +631,8 @@ fi
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
# segment. # segment. Parameter expansions are very flexible and fast, too. See reference:
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
# #
# Within the expansion the following parameters are always available: # Within the expansion the following parameters are always available:
# #
@ -667,11 +668,11 @@ fi
# - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
# - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
# - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
# The expansion below will show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
# to P9K_KUBECONTEXT_NAME. Parameter expansions are very flexible and fast, too. See reference: POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. # Append the current context's namespace if it's not "default".
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}/${P9K_KUBECONTEXT_NAMESPACE}' POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
# Custom prefix. # Custom prefix.
# typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%248Fat ' # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%248Fat '

@ -605,7 +605,8 @@ fi
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
# segment. # segment. Parameter expansions are very flexible and fast, too. See reference:
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
# #
# Within the expansion the following parameters are always available: # Within the expansion the following parameters are always available:
# #
@ -641,11 +642,11 @@ fi
# - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
# - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
# - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
# The expansion below will show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
# to P9K_KUBECONTEXT_NAME. Parameter expansions are very flexible and fast, too. See reference: POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. # Append the current context's namespace if it's not "default".
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}/${P9K_KUBECONTEXT_NAMESPACE}' POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
# Custom prefix. # Custom prefix.
# typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '

Loading…
Cancel
Save