sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
13.97k stars 4.49k forks source link

add zcompile to completion init #1418

Open voyeg3r opened 7 years ago

voyeg3r commented 7 years ago

Description

First of all I am not using prezto, but as long as I am a zsh user I would like to give my contribution to this amazing project

My compinit looks like

ZSH_COMPDUMP="${ZDOTDIR}/.zcompdump"
autoload -Uz compinit zcompile
if [[ -n $ZSH_COMPDUMP(#qN.mh+24) ]]; then
    compinit -i  $ZSH_COMPDUMP
    zcompile $ZSH_COMPDUMP
else
    compinit -i -C
fi

It is a little bit different of zprezto but the most significant part is the use of zcompile. It creates a pre compiled version of any zsh file, something similar to python bytecode (I guess). I think it would bring better performance to zpresto

Another thing I guess would be nice using are:

I hope that issue came in handy!

indrajitr commented 7 years ago

Interesting ideas, thanks @voyeg3r!

tekumara commented 4 years ago

zcompdump is being compiled here https://github.com/sorin-ionescu/prezto/blob/master/runcoms/zlogin#L13

srijanshetty commented 4 years ago

@voyeg3r the links that you have posted seem to be broken links. Could you kindly fix them?

belak commented 4 years ago

As this issue is 3 years old, I've taken the time to pull updated links.

Zim was moved and changed a bit but https://github.com/zimfw/zimfw/blob/master/src/templates/login_init.zsh.erb looks relevant. And it looks like lazy-load was moved to https://github.com/xcv58/zsh-lazy-load/.

srijanshetty commented 4 years ago

Thanks a lot @belak. Will go over them