prezto icon indicating copy to clipboard operation
prezto copied to clipboard

add zcompile to completion init

Open voyeg3r opened this issue 6 years ago • 5 comments

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:

  • https://github.com/xcv58/prezto/tree/master/modules/lazy-load
  • https://raw.githubusercontent.com/Eriner/zim/master/templates/zlogin On zim zlogin for example it has a zcompare function to test if is necessary zcompile zomething.

I hope that issue came in handy!

voyeg3r avatar Aug 05 '17 13:08 voyeg3r

Interesting ideas, thanks @voyeg3r!

indrajitr avatar Aug 18 '17 04:08 indrajitr

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

tekumara avatar Jun 07 '20 08:06 tekumara

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

srijanshetty avatar Jun 07 '20 16:06 srijanshetty

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/.

belak avatar Jun 08 '20 19:06 belak

Thanks a lot @belak. Will go over them

srijanshetty avatar Jun 09 '20 18:06 srijanshetty