From 24b552c16de7574e7f925e412997c9eac46aea5e Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 29 Jul 2019 09:52:00 -0400 Subject: [PATCH] Update plugins and configure kube-ps1 --- link/nix/zshrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/link/nix/zshrc b/link/nix/zshrc index f9e754e..73a1bbd 100644 --- a/link/nix/zshrc +++ b/link/nix/zshrc @@ -55,7 +55,7 @@ ZSH_CUSTOM=~/repos/customized-oh-my-zsh # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(aws brew bundler gem git git-flow github history kubectl osx pip python terraform vagrant) +plugins=(brew bundler gem git git-flow github history kube-ps1 kubectl osx pip python terraform vagrant) source $ZSH/oh-my-zsh.sh @@ -151,4 +151,11 @@ if [[ `uname` == 'Darwin' ]]; then # added by travis gem [ -f ~/.travis/travis.sh ] && source ~/.travis/travis.sh || echo 'The travis gem is missing. After installing it run "echo y|travis" to create ~/.travis' + + function get_cluster_short() { + echo "$1" |rev |cut -d _ -f1 |rev + } + KUBE_PS1_CLUSTER_FUNCTION=get_cluster_short + KUBE_PS1_COLOR_CONTEXT="%{$fg[yellow]%}" + KUBE_PS1_ENABLED=false fi