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.

26 lines
669 B

3 years ago
  1. # kubectx - show active kubectl context
  2. This plugins adds ```kubectx_prompt_info()``` function. It shows name of the
  3. active kubectl context (```kubectl config current-context```).
  4. You can use it to customize prompt and know if You are on prod cluster ;)
  5. _Example_. Add to **.zshrc**:
  6. ```
  7. RPS1='$(kubectx_prompt_info)'
  8. ```
  9. ### custom ctx names
  10. One can rename default context name for better readability.
  11. _Example_. Add to **.zshrc**:
  12. ```
  13. kubectx_mapping[minikube]="mini"
  14. kubectx_mapping[context_name_from_kubeconfig]="$emoji[wolf_face]"
  15. kubectx_mapping[production_cluster]="%{$fg[yellow]%}prod!%{$reset_color%}"
  16. ```
  17. ![staging](stage.png)
  18. ![production](prod.png)