Skip to content

Commit

Permalink
Cache for fasd --init
Browse files Browse the repository at this point in the history
Using cache technique for faster fasd --init as shown at:
 https://github.com/clvv/fasdi#install
  • Loading branch information
lorn committed Apr 30, 2013
1 parent b6ea876 commit f28e16a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/fasd/fasd.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
if [ $commands[fasd] ]; then # check if fasd is installed
eval "$(fasd --init auto)"
fasd_cache="$HOME/.fasd-init-cache"
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
fasd --init auto >| "$fasd_cache"
fi
source "$fasd_cache"
unset fasd_cache
alias v='f -e vim'
alias o='a -e open'
fi
Expand Down

0 comments on commit f28e16a

Please sign in to comment.