Skip to content

Instantly share code, notes, and snippets.

@psalaberria002
Last active February 27, 2018 19:41
Show Gist options
  • Save psalaberria002/68748fc8b0c87aefd4370e5f13b7b89b to your computer and use it in GitHub Desktop.
Save psalaberria002/68748fc8b0c87aefd4370e5f13b7b89b to your computer and use it in GitHub Desktop.
# Kubeon/Kubeoff
if [ ! -f ~/.kube-ps1/kube-ps1.sh ]; then
echo "Kube PS1 not installed. Installing from https://github.com/jonmosco/kube-ps1 ..."
git clone https://github.com/jonmosco/kube-ps1 ~/.kube-ps1
fi
KUBE_PS1_SYMBOL_USE_IMG="${KUBE_PS1_SYMBOL_USE_IMG:-false}"
KUBE_PS1_CTX_COLOR="${KUBE_PS1_CTX_COLOR:-blue}"
KUBE_PS1_SYMBOL_ENABLE="${KUBE_PS1_SYMBOL_ENABLE:-true}"
KUBE_PS1_SEPARATOR="${KUBE_PS1_SEPARATOR:-}"
KUBE_PS1_PREFIX="${KUBE_PS1_PREFIX:- }"
KUBE_PS1_SUFFIX="${KUBE_PS1_SUFFIX:-}"
KUBE_PS1_NS_ENABLE="${KUBE_PS1_NS_ENABLE:-false}"
KUBE_PS1_SYMBOL_DEFAULT="${KUBE_PS1_SYMBOL_DEFAULT:-\u2388}"
source ~/.kube-ps1/kube-ps1.sh
# Git Prompt
if [ ! -f ~/.zsh-git-prompt/zshrc.sh ]; then
echo "Zsh git prompt not installed. Installing from https://github.com/olivierverdier/zsh-git-prompt.git ..."
git clone https://github.com/olivierverdier/zsh-git-prompt.git ~/.zsh-git-prompt
fi
source ~/.zsh-git-prompt/zshrc.sh
ZSH_THEME_GIT_PROMPT_PREFIX=" ("
setopt PROMPT_SUBST
PROMPT='$fg[magenta]%~%{$reset_color%}$(git_super_status)$(kube_ps1)'$'\n'"$FG[137]$ %{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment