1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 13:30:07 +00:00

docs: prune the list of kubecontext commands

This commit is contained in:
Roman Perepelitsa 2023-03-03 17:01:19 +01:00
parent 373337123c
commit 2aa16c5431

View file

@ -215,9 +215,8 @@ Configs created by `p10k configure` enable show on command for several prompt se
Here's the relevant parameter for kubernetes context: Here's the relevant parameter for kubernetes context:
```zsh ```zsh
# Show prompt segment "kubecontext" only when the command you are typing # Show prompt segment "kubecontext" only when the command you are typing invokes one of these tools.
# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl, stern, kubeseal, skaffold, kubent, or kubecolor. typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor'
``` ```
To customize when different prompt segments are shown, open `~/.p10k.zsh`, search for To customize when different prompt segments are shown, open `~/.p10k.zsh`, search for
@ -1230,9 +1229,9 @@ Prompt segments can be configured to be shown only when the current command you
a relevant tool. a relevant tool.
```zsh ```zsh
# Show prompt segment "kubecontext" only when the command you are typing # Show prompt segment "kubecontext" only when the command you are typing invokes
# invokes kubectl, helm, kubens, kubectx, oc, istioctl, kogito, k9s, helmfile, flux, fluxctl, stern, kubeseal, skaffold, or kubent. # invokes kubectl, helm, or kubens.
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor' typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'
``` ```
Configs created by `p10k configure` may contain parameters of this kind. To customize when different Configs created by `p10k configure` may contain parameters of this kind. To customize when different
@ -1248,7 +1247,7 @@ function kube-toggle() {
if (( ${+POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND} )); then if (( ${+POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND} )); then
unset POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND unset POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND
else else
POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor' POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens'
fi fi
p10k reload p10k reload
if zle; then if zle; then