all repos — archive/dotfiles @ 17b0737897f259d84a0e1f9aaa165c027e190215

Superseded by nixfiles

zsh: conditionally lazy load docker-compose and kubernetes plugins
Alan Pearce alan@alanpearce.eu
Sun, 22 Sep 2019 14:07:19 +0200
commit

17b0737897f259d84a0e1f9aaa165c027e190215

parent

52ea77b3a4e3e53d63ead73d78f891c650278d47

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M zsh/.config/zsh/.zshrczsh/.config/zsh/.zshrc
@@ -145,6 +145,7 @@ # Plugins 
 zplugin ice blockf wait'0' lucid
 zplugin load "zsh-users/zsh-completions"
+zplugin ice wait'[[ -n ${ZLAST_COMMANDS[(r)k*]} || "$PWD" =~ "kubernetes" ]]'
 zplugin load alanpearce/kubectl-aliases
 zplugin ice wait'1' lucid atinit'alias cdg=cd-gitroot'
 zplugin load "mollifier/cd-gitroot"
@@ -163,7 +164,7 @@ zplugin ice if'[[ $os -eq darwin ]]' zplugin snippet "OMZ::lib/functions.zsh"
 zplugin ice if'[[ $os -eq darwin ]]'
 zplugin snippet "OMZ::lib/termsupport.zsh"
-zplugin ice id-as'docker-compose-completion'
+zplugin ice id-as'docker-compose-completion' wait'[[ -n ${ZLAST_COMMANDS[(r)d*]} ]]' lucid
 zplugin snippet "https://github.com/docker/compose/raw/1.24.1/contrib/completion/zsh/_docker-compose"
 
 zplugin ice if'[[ $os -eq darwin ]]' wait'1' lucid