diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-09-09 16:29:31 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-09-09 16:29:31 +0300 |
commit | ca49498cb6f138249058d096e65f612990637e04 (patch) | |
tree | 0d4e31e188f96e2179bdec20fecd10c07bd8ffff /config/p10k-lean.zsh | |
parent | 4313c36df963b01232333994bb55e2d50b29c7c1 (diff) |
don't display kubecontext namespace if it's literally 'default'
Diffstat (limited to 'config/p10k-lean.zsh')
-rw-r--r-- | config/p10k-lean.zsh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 405e968d..ec03c9c7 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -605,7 +605,8 @@ fi # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' # 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: # @@ -641,11 +642,11 @@ fi # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 - # - # The expansion below will show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back - # to P9K_KUBECONTEXT_NAME. Parameter expansions are very flexible and fast, too. See reference: - # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}/${P9K_KUBECONTEXT_NAMESPACE}' + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= + # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' + # Append the current context's namespace if it's not "default". + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' # Custom prefix. # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' |