We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44e7bd6 commit 7c4f6abCopy full SHA for 7c4f6ab
bash/bashrc.bash
@@ -4,7 +4,14 @@
4
HISTSIZE=5000
5
HISTFILESIZE=10000
6
shopt -s histappend
7
-export PROMPT_COMMAND="$PROMPT_COMMAND; history -a"
+
8
+function add_kubectl_context(){
9
+ KUBE_PS1_SYMBOL_IMG=$'\xE2\x98\xB8 '
10
+ KUBECTL_CURRENT_CONTENT=$(kubectl config view | grep current-context | sed -e "s|current-context: ||g" | tr -d "\n\r")
11
+ PS1="${KUBE_PS1_SYMBOL_IMG}${KUBECTL_CURRENT_CONTENT}$PS1"
12
+}
13
14
+export PROMPT_COMMAND="${PROMPT_COMMAND:-true}; add_kubectl_context;history -a"
15
16
#Keep your version of the universe
17
export PATH="$HOME/.local/bin:$HOME/bin:$PATH"
@@ -29,7 +36,6 @@ source /usr/share/fzf/shell/key-bindings.bash
29
36
30
37
#minikube
31
38
source <(minikube completion bash)
32
-alias kubectl='minikube kubectl'
33
39
34
40
#kubectl
35
41
source <(kubectl completion bash)
0 commit comments