k8s support
This commit is contained in:
parent
9021ae76f3
commit
49c58da9f5
19
zsh/k8s.zsh
Normal file
19
zsh/k8s.zsh
Normal file
@ -0,0 +1,19 @@
|
||||
slimline::section::k8s_context::precmd() {
|
||||
unset slimline_section_k8s_context_output
|
||||
}
|
||||
|
||||
slimline::section::k8s_context::async_task() {
|
||||
kubectl config current-context
|
||||
# gsed -nr '/current-context/s/(.*) (.*)/\2/p' ~/.kube/config
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
slimline::utils::expand "k8s_context" "[k8s:%F{blue}|output|%f]" \
|
||||
"output" "${slimline_section_k8s_context_output}" \
|
||||
}
|
Loading…
Reference in New Issue
Block a user