summaryrefslogtreecommitdiff
path: root/hooks/post-update
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/post-update')
-rw-r--r--hooks/post-update13
1 files changed, 12 insertions, 1 deletions
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
}