From 9c2561944d374517bd408197fd056cfb6be8c51d Mon Sep 17 00:00:00 2001 From: Amand Tihon Date: Thu, 6 Dec 2012 11:15:13 +0100 Subject: [PATCH] Move compinit into the completion snippet, and actually use it. --- S40_completion | 3 +++ example/zshrc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/S40_completion b/S40_completion index a2b8ece..4c2d9af 100644 --- a/S40_completion +++ b/S40_completion @@ -1,5 +1,7 @@ #! /usr/bin/zsh +autoload -U compinit + hosts=($( ( \ ( [ -r ~/.ssh/config ] && awk '/^host +[a-z]/ { print $2 }' ~/.ssh/config) ; \ ( [ -r ~/.ssh/known_hosts ] && awk '{print $1}' ~/.ssh/known_hosts | tr , '\n') \ @@ -14,3 +16,4 @@ zstyle ':completion:*' users $users compdef _hosts cc_sync +compinit diff --git a/example/zshrc b/example/zshrc index 6b1d0c3..1e313da 100644 --- a/example/zshrc +++ b/example/zshrc @@ -1,6 +1,6 @@ #! /usr/bin/zsh -autoload -U compinit zrecompile +autoload -U zrecompile zsh_cache=${HOME}/.zsh_cache mkdir -p $zsh_cache -- 2.39.2