summary refs log tree commit diff stats
path: root/hooks/post-up/zsh
diff options
context:
space:
mode:
authorAlan Pearce2014-04-12 18:21:27 +0100
committerAlan Pearce2014-04-12 18:21:27 +0100
commit34d2b95ffd8137abf714d5996efaa1ae1b550ca0 (patch)
treed5f3eb6fa8e77e57f4acad71e14a5dc84140a147 /hooks/post-up/zsh
parentabaa898a029505446c6f8cbf3a45d17f9e15a571 (diff)
downloaddotfiles-34d2b95ffd8137abf714d5996efaa1ae1b550ca0.tar.lz
dotfiles-34d2b95ffd8137abf714d5996efaa1ae1b550ca0.tar.zst
dotfiles-34d2b95ffd8137abf714d5996efaa1ae1b550ca0.zip
zsh: Use system version of fasd
Diffstat (limited to 'hooks/post-up/zsh')
-rwxr-xr-xhooks/post-up/zsh5
1 files changed, 2 insertions, 3 deletions
diff --git a/hooks/post-up/zsh b/hooks/post-up/zsh
index 78eb093..b31a8cb 100755
--- a/hooks/post-up/zsh
+++ b/hooks/post-up/zsh
@@ -7,14 +7,13 @@ then
 fi
 
 fasd_cache=~/.cache/zsh/fasd-init-zsh
-if [[ ! -s "$fasd_cache" || $ZDOTDIR/functions/fasd/fasd -nt "$fasd_cache" ]]; then
-	$ZDOTDIR/functions/fasd/fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install >! "$fasd_cache"
+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=(
-	$ZDOTDIR/functions/fasd/fasd
 	$fasd_cache
 	$ZDOTDIR/zshrc
 )