From 53861212825c8cf6096a30e1d047931286e85846 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 13 Apr 2014 09:50:36 +0100 Subject: zsh: Compile fasd and use as a function. --- hooks/post-up/zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hooks/post-up') diff --git a/hooks/post-up/zsh b/hooks/post-up/zsh index e69362b4..05a72378 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 -- cgit 1.4.1