#!/usr/bin/env zsh ZDOTDIR="${XDG_CONFIG_HOME:~/.config}/zsh" if [[ ! -d ~/.cache/zsh ]] then mkdir -p ~/.cache/zsh fi fasd_cache=~/.cache/zsh/fasd-init-zsh if [[ -s $commands[fasd] && (! -s "$fasd_cache" || $commands[fasd] -nt "$fasd_cache") ]]; then fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install >! "$fasd_cache" fi autoload -U zrecompile local -a zfiles zfiles=( $fasd_cache $ZDOTDIR/zshrc ) if [[ -f $ZDOTDIR/${HOST%%.*}.zsh ]]; then zfiles+=$ZDOTDIR/${HOST%%.*}.zsh fi if [[ $OSTYPE == freebsd* ]]; then zfiles+=$ZDOTDIR/freebsd.zsh fi zrecompile -p -R $ZDOTDIR/.zshrc.zwc $zfiles -- \ -M .cache/zsh/compdump for fp in $ZDOTDIR/functions/*(/); do zrecompile -p $fp $fp/* done