2020-01-10 17:57:57 +01:00
|
|
|
slimline::section::k8s_context::precmd() {
|
|
|
|
unset slimline_section_k8s_context_output
|
|
|
|
}
|
|
|
|
|
|
|
|
slimline::section::k8s_context::async_task() {
|
|
|
|
kubectl config current-context
|
|
|
|
}
|
|
|
|
|
|
|
|
slimline::section::k8s_context::async_task_complete() {
|
|
|
|
slimline_section_k8s_context_output=$2
|
|
|
|
}
|
|
|
|
|
|
|
|
slimline::section::k8s_context::render() {
|
|
|
|
[[ -z "${slimline_section_k8s_context_output}" ]] && return
|
|
|
|
|
2020-01-20 13:28:41 +01:00
|
|
|
slimline::utils::expand "k8s_context" "%F{blue}\U2388 |output|%f" \
|
2020-01-15 13:13:57 +01:00
|
|
|
"output" "${slimline_section_k8s_context_output}"
|
2020-01-10 17:57:57 +01:00
|
|
|
}
|