zpm-zsh / zpm

Zpm— Zsh Plugin Manager
https://github.com/zpm-zsh/zpm
GNU Lesser General Public License v3.0
356 stars 22 forks source link

Iterm session exiting when using cache #14

Closed JoeWoodward closed 4 years ago

JoeWoodward commented 4 years ago

I've just installed zpm and had to debug this message

Usage: add-zsh-hook hook function
Valid hooks are:
  chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name

I have found that if I delete the cache the terminal works correctly and doesn't exit. Any sessions after this one will show the error above and then exit. I think it might be something to do with autoloading add-zsh-config

JoeWoodward commented 4 years ago

In fact, maybe it's this line that is generated for the cached .zsh file

  add-zsh-hook -d background _ZPM_post_fn

background is not a valid hook

JoeWoodward commented 4 years ago

Couldn't a heredoc be used here to really cleanup that echo statement a lot too?

JoeWoodward commented 4 years ago

Ok, so background is added with the zpm-zsh/background plugin but doesn't seem to be loaded in a cached session

grigorii-horos commented 4 years ago

@JoeWoodward Hi, I fixed it. try to update zpm from git

JoeWoodward commented 4 years ago

So fast! Thank you

grigorii-horos commented 4 years ago

@JoeWoodward It works?

JoeWoodward commented 4 years ago

Yes, thank you