Add ability to provide a cluster function in kubecontext segment
This makes it possible to customize the displayed cluster name, e.g. `gke_project-name-1337_europe-west1-c_production` -> `production`
This commit is contained in:
parent
214d12b275
commit
a9d99c9cab
2 changed files with 16 additions and 0 deletions
|
@ -2126,6 +2126,9 @@ prompt_kubecontext() {
|
|||
fi
|
||||
done
|
||||
fi
|
||||
if [[ -n $POWERLEVEL9K_KUBECONTEXT_CONTEXT_FUNCTION ]]; then
|
||||
ctx=$($POWERLEVEL9K_KUBECONTEXT_CONTEXT_FUNCTION $ctx)
|
||||
fi
|
||||
_p9k_cache_set "$ctx" "$suf"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue