Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cache for fasd --init

Using cache technique for faster fasd --init as shown at:
 https://github.com/clvv/fasdi#install
  • Loading branch information...
commit f28e16a15856baf92163dba8ac6eec1e02cf6c1f 1 parent b6ea876
@lorn lorn authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 plugins/fasd/fasd.plugin.zsh
View
7 plugins/fasd/fasd.plugin.zsh
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.