feat: add k8s namespace indicator (#1887)

* Add k8s namespace to prompt
This commit is contained in:
ofir shtrull
2021-06-10 16:04:56 +03:00
committed by GitHub
parent 9b62a5c4df
commit 2444a57cc5
7 changed files with 27 additions and 0 deletions

View File

@@ -437,6 +437,10 @@ function k8s_context_prompt {
echo -e "$(kubectl config current-context 2> /dev/null)"
}
function k8s_namespace_prompt {
echo -e "$(kubectl config view --minify --output 'jsonpath={..namespace}' 2> /dev/null)"
}
function virtualenv_prompt {
if [[ -n "$VIRTUAL_ENV" ]]; then
virtualenv=$(basename "$VIRTUAL_ENV")