From 17b0737897f259d84a0e1f9aaa165c027e190215 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 22 Sep 2019 14:07:19 +0200 Subject: zsh: conditionally lazy load docker-compose and kubernetes plugins --- zsh/.config/zsh/.zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'zsh') diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 8921d465..b577b1b0 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -145,6 +145,7 @@ zstyle ':completion:*' completer _expand _complete _match 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 -- cgit 1.4.1