Scripting with zplug: `zsh -c "source ~/.zshrc"` fails when running `zplug load` #209
It simply seems that zplug does not work in a script setting. I saw #116 but I'm not to sure this is related, and it was closed due to inactivity. I do want to mention that this process worked with zgen, so it appears to be something specific to zplug.
Simply sourcing zplug and installing a single plugin k. Echoing at ending of file to show that file was executed fully.
source ~/.zplug/init.zsh zplug "supercrabtree/k" zplug check || zplug install zplug load --verbose echo "finished .zshrc"
Steps to Reproduce
Thanks for reporting! I'm not sure if I followed the right steps, but I couldn't reproduce it. Here's what I did:
And got the output
@kevinjalbert could you try without your dotfiles enabled (or comment out the line that loads them) ?
I use that plugin too and have no problem.
If you did a bootstrap script script maybe you forgot a
@NigoroJr Good call on the typo with running
I saw the same results by following the steps you outlined. I fiddled around and found that the issue is that you have an empty
This led me to thinking that this is a cache problem. Now between runs I cleared the cache (
I'm not too sure but it seems that when using
@dezza I was using the minimal zsh config (and now just tried with an empty
@b4b4r07 no worries about not being able to get to this right away. For the time being I've found a temporary solution:
With this in my
I think there is still value in this issue but it is a pretty specific case. There is also a temporary solution to the issue. Possibly keep the issue open but de-prioritize it?