From 7c1c72e60a446ac1c31421ccf1a485636e04dbec Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 17 Aug 2008 10:36:42 +0200 Subject: Also include functions and completions from other packages --- hooks/post-add | 3 +-- hooks/post-update | 13 ++++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'hooks') diff --git a/hooks/post-add b/hooks/post-add index ed8c582..e92df4e 100644 --- a/hooks/post-add +++ b/hooks/post-add @@ -1,2 +1 @@ -mkdir -p $HOME/var/cache/zsh -mkdir -p $PDIR/zsh/provided +post-update \ No newline at end of file diff --git a/hooks/post-update b/hooks/post-update index 554edff..fad04b1 100644 --- a/hooks/post-update +++ b/hooks/post-update @@ -1,9 +1,20 @@ # vim:ft=zsh mkdir -p $HOME/var/cache/zsh mkdir -p $PDIR/zsh/provided -rm $HOME/var/cache/zsh/compdump +rm -f $HOME/var/cache/zsh/compdump echo -n > $PDIR/zsh/provided/includes +typeset -a futurepath +for inc in $PDIR/*/provides/zsh/{functions,completions}(N); { + futurepath+=$inc +} +if [[ -n $futurepath ]] { + echo "fpath=($futurepath" '$fpath)' >> $PDIR/zsh/provided/includes +} +for inc in $PDIR/*/provides/zsh/functions(N); { + echo "autoload ${inc:t}" >> $PDIR/zsh/provided/includes +} + for snippet in $PDIR/*/provides/zsh/*(.N); { echo "source $snippet" >> $PDIR/zsh/provided/includes } -- cgit v1.2.3