From: Amand Tihon Date: Thu, 6 Dec 2012 10:15:13 +0000 (+0100) Subject: Move compinit into the completion snippet, and actually use it. X-Git-Url: https://git.alrj.org/?a=commitdiff_plain;h=9c2561944d374517bd408197fd056cfb6be8c51d;p=zsh.d.git Move compinit into the completion snippet, and actually use it. --- 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