Skip to content

Instantly share code, notes, and snippets.

@voyeg3r
Last active August 1, 2017 16:57
Show Gist options
  • Save voyeg3r/4cf65e01a357029ace20907f6b1db5cf to your computer and use it in GitHub Desktop.
Save voyeg3r/4cf65e01a357029ace20907f6b1db5cf to your computer and use it in GitHub Desktop.
# This is my attempt to create a lazy loading for
# fasdcd command "z", in this case
# I would like to receive comments and tips to better understaingin the process of creating
# lazy_load functions and how to apply this knowledge to improve zsh startup, specially
# to improve compninit (zsh completion system)
# sources:
# https://kev.inburke.com/kevin/profiling-zsh-startup-time/
# https://github.com/benvan/sandboxd/blob/master/sandboxrc.example
# https://github.com/xcv58/prezto/tree/master/modules/lazy-load
# plase help me if you thing this is wrong
# @voyeg3r at twitter dot com
z () {
(( $+commands[fasd] )) || {
source /home/user/.dotfiles/bin/fasd
eval "$(fasd --init auto)"
z "$@"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment