Skip to content

Instantly share code, notes, and snippets.

@cosmo0920
Created May 11, 2013 17:46
Show Gist options
  • Save cosmo0920/5560773 to your computer and use it in GitHub Desktop.
Save cosmo0920/5560773 to your computer and use it in GitHub Desktop.
auto-fu
# auto-fu.zsh
function () { # precompile
local A
A=$HOME/auto-fu.zsh/auto-fu.zsh
[[ -e "${A:r}.zwc" ]] && [[ "$A" -ot "${A:r}.zwc" ]] ||
zsh -c "source $A; auto-fu-zcompile $A ${A:h}" >/dev/null 2>&1
}
if [ -f $HOME/auto-fu.zsh/auto-fu.zsh ]; then
source $HOME/auto-fu.zsh/auto-fu.zsh
function zle-line-init () {
auto-fu-init
}
zle -N zle-line-init
zstyle ':completion:*' completer _expand _complete _match _prefix\
_approximate _list _history
zstyle ':auto-fu:var' postdisplay $'
auto-fu>'
zstyle ':auto-fu:highlight' input bold
zstyle ':auto-fu:highlight' completion fg=black,bold
zstyle ':auto-fu:highlight' completion/one fg=white,bold,underline
setopt auto_list auto_param_slash list_packed rec_exact
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment