summary refs log tree commit diff stats
path: root/hooks/post-up/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/post-up/zsh')
-rwxr-xr-xhooks/post-up/zsh10
1 files changed, 10 insertions, 0 deletions
diff --git a/hooks/post-up/zsh b/hooks/post-up/zsh
index e69362b..05a7237 100755
--- a/hooks/post-up/zsh
+++ b/hooks/post-up/zsh
@@ -39,4 +39,14 @@ for fp in $ZDOTDIR/functions/*(/); do
 	zrecompile -p $fp $fp/*
 done
 
+if [[ -s $commands[fasd] ]]; then
+	if [[ ! -d $ZDOTDIR/functions/fasd ]]; then
+		mkdir $ZDOTDIR/functions/fasd
+	fi
+	if [[ ! -h $ZDOTDIR/functions/fasd/fasd ]]; then
+		ln -s =fasd $ZDOTDIR/functions/fasd/fasd
+	fi
+	zrecompile -p $ZDOTDIR/functions/fasd $ZDOTDIR/functions/fasd/fasd
+fi
+
 [[ -f ~/.zsh/fasd-data ]] && mv ~/.zsh/fasd-data ~/.cache/zsh/fasd-data