summaryrefslogtreecommitdiff
path: root/hooks/post-update
blob: fad04b128f8545e9ead1d97633aa64cdcd145151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# vim:ft=zsh
mkdir -p $HOME/var/cache/zsh
mkdir -p $PDIR/zsh/provided
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
}