From 693e85c0d942ab38c539b31a8c95e1a3ed285b69 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 29 Jul 2019 09:44:31 -0400 Subject: [PATCH 1/7] Added blank line at the end of the file --- link/nix/vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/link/nix/vimrc b/link/nix/vimrc index fc96b5d..9b3d810 100644 --- a/link/nix/vimrc +++ b/link/nix/vimrc @@ -71,3 +71,4 @@ let g:vim_markdown_folding_disabled = 1 " import settings that are OS specific source ~/.vimrc_os_specific + From 0919cf894c73fa357e82ccf3cc42427211c4c295 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 29 Jul 2019 09:47:50 -0400 Subject: [PATCH 2/7] Move customizations outside .oh-my-zsh --- link/nix/zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/link/nix/zshrc b/link/nix/zshrc index a07bc57..2fa4b95 100644 --- a/link/nix/zshrc +++ b/link/nix/zshrc @@ -49,6 +49,7 @@ COMPLETION_WAITING_DOTS="false" # Would you like to use another custom folder than $ZSH/custom? # ZSH_CUSTOM=/path/to/new-custom-folder +ZSH_CUSTOM=~/repos/customized-oh-my-zsh # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ From 6c6a31686134b93388dd34c338d6375791be3dd2 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 29 Jul 2019 09:49:15 -0400 Subject: [PATCH 3/7] Try to fix tab completions --- link/nix/zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/link/nix/zshrc b/link/nix/zshrc index 2fa4b95..86dc05a 100644 --- a/link/nix/zshrc +++ b/link/nix/zshrc @@ -61,6 +61,9 @@ source $ZSH/oh-my-zsh.sh # User configuration +# make tab completions work right +autoload -Uz compinit && compinit + [ -f ~/.private-env ] && source ~/.private-env || echo '~/.private-env is missing' # Start GPG agent From f665eb25706b88d9645ebb194a328b1bcbbf480c Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 29 Jul 2019 09:49:41 -0400 Subject: [PATCH 4/7] Update GPG Agent settings --- link/nix/zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/link/nix/zshrc b/link/nix/zshrc index 86dc05a..d10c9d9 100644 --- a/link/nix/zshrc +++ b/link/nix/zshrc @@ -68,8 +68,8 @@ autoload -Uz compinit && compinit # Start GPG agent export GPG_TTY=$(tty) -gpg-connect-agent /bye export SSH_AUTH_SOCK=~/.gnupg/S.gpg-agent.ssh +gpg-connect-agent updatestartuptty /bye >/dev/null # export MANPATH="/usr/local/man:$MANPATH" From 9faa0f0068527d62470be0bb417e3beaa75ac03f Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 29 Jul 2019 09:50:26 -0400 Subject: [PATCH 5/7] Add tools to path if they are installed --- link/nix/zshrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/link/nix/zshrc b/link/nix/zshrc index d10c9d9..5a2c659 100644 --- a/link/nix/zshrc +++ b/link/nix/zshrc @@ -130,7 +130,11 @@ if [[ `uname` == 'Darwin' ]]; then eval '/usr/libexec/path_helper -s' > /dev/null + # Add OVFTool to PATH if it is installed + [ -d '/Applications/VMware OVF Tool' ] && export PATH=$PATH:'/Applications/VMware OVF Tool' + # optional additions from homebrew + [ -d "/usr/local/opt/node@10/bin" ] && export PATH="/usr/local/opt/node@10/bin:$PATH" [ -d /usr/local/opt/qt/bin ] && export PATH=$PATH:/usr/local/opt/qt/bin # use homebrew's ruby From 27649be50cba7fcd359de79c2cfa3b63c3072665 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 29 Jul 2019 09:50:59 -0400 Subject: [PATCH 6/7] Make sure gems are in my path --- link/nix/zshrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/link/nix/zshrc b/link/nix/zshrc index 5a2c659..f9e754e 100644 --- a/link/nix/zshrc +++ b/link/nix/zshrc @@ -140,6 +140,10 @@ if [[ `uname` == 'Darwin' ]]; then # use homebrew's ruby [ -d /usr/local/opt/ruby/bin ] && export PATH=/usr/local/opt/ruby/bin:$PATH + # add gems to path + GEMBIN="$(gem environment gemdir)/bin" + export PATH=$PATH:$GEMBIN + if [[ -f '/Applications/google-cloud-sdk' ]]; then source /Applications/google-cloud-sdk/completion.zsh.inc source /Applications/google-cloud-sdk/path.zsh.inc From 24b552c16de7574e7f925e412997c9eac46aea5e Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 29 Jul 2019 09:52:00 -0400 Subject: [PATCH 7/7] 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