f33e1b1fb15a7fa0ea8f05f96b93d3579db6e5da
- Author
- Pavle Portic <git@theedgeofrage.com>
- Committer
- Pavle Portic <git@theedgeofrage.com>
- Date
Message
Add kubectl prompt
Diff
1diff --git a/boban.zsh-theme b/boban.zsh-theme
2index 27d20ccd4f45639bee4068504dfd61687fbb8d6c..3ec53090d0949cf511dfa2f0a6edda912f04f8b9 100644
3--- a/boban.zsh-theme
4+++ b/boban.zsh-theme
5@@ -146,6 +146,14 @@ prompt_tf() {
6 fi
7 }
8
9+# Kubectl: current active kubeconfig file
10+prompt_kubectl() {
11+ local kubeconfig="$KUBECONFIG"
12+ if [[ -n $kubeconfig ]]; then
13+ prompt_segment magenta black "${config_name}"
14+ fi
15+}
16+
17 # Status:
18 # - was there an error
19 # - am I root
20@@ -174,6 +182,7 @@ build_prompt() {
21 prompt_aws
22 prompt_dir
23 prompt_virtualenv
24+ prompt_kubectl
25 prompt_tf
26 prompt_git
27 prompt_end