my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
318 B

3 years ago
  1. typeset -g -A kubectx_mapping
  2. function kubectx_prompt_info() {
  3. (( $+commands[kubectl] )) || return
  4. local current_ctx=$(kubectl config current-context)
  5. # use value in associative array if it exists
  6. # otherwise fall back to the context name
  7. echo "${kubectx_mapping[$current_ctx]:-${current_ctx:gs/%/%%}}"
  8. }