summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2014-06-25 22:19:54 +0100
committerAlan Pearce2014-06-25 22:19:54 +0100
commite2f91f42974029f7d6f08b78573c0ab5079fb484 (patch)
treede32472ac8a532ee653a8575387f9434154f648a
parent22db368a72cf34fc7a0a326afe2f38efd42ed171 (diff)
downloadnixfiles-e2f91f42974029f7d6f08b78573c0ab5079fb484.tar.lz
nixfiles-e2f91f42974029f7d6f08b78573c0ab5079fb484.tar.zst
nixfiles-e2f91f42974029f7d6f08b78573c0ab5079fb484.zip
rcm: Fix zsh compilation error when missing fasd
-rwxr-xr-xhooks/post-up/zsh9
1 files changed, 4 insertions, 5 deletions
diff --git a/hooks/post-up/zsh b/hooks/post-up/zsh
index dda5ec9b..f4720813 100755
--- a/hooks/post-up/zsh
+++ b/hooks/post-up/zsh
@@ -13,17 +13,16 @@ then
 	mkdir -p ~/.cache/zsh
 fi
 
+local -a zfiles
+zfiles=($ZDOTDIR/zshrc)
+
 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"
+	zfiles=($fasd_cache $zfiles)
 fi
 
 autoload -U zrecompile
-local -a zfiles
-zfiles=(
-	$fasd_cache
-	$ZDOTDIR/zshrc
-)
 
 if [[ -f $ZDOTDIR/${HOST%%.*}.zsh ]]; then
 	zfiles+=$ZDOTDIR/${HOST%%.*}.zsh