infoline still shows if module loaded but another prompt is active
Plloi opened this issue · 3 comments
Not too worried about it, because if i'm going to move to another prompt just remove the module. But i thought i should mention it.
So I was curious enough to find out what's happening, zimfw/zimfw#257 added ${module}/${module}.zsh-theme
along with a few other files to the "If it exists source it" pile. Moving the zsh-theme file to a sub-directory like in the prompt module it should sort it right out.
Yeah using the function to register the prompt was a ‚hack‘ before the proper system was invented. I guess removing the function would fix this, but would break older zimfw versions.
Considering that @Eriner likes to keep us at the bleeding edge anyway, that might not be much of an issue though.
The issue you mentioned might maybe need an unloading mechanism though - I’ll take a look at it. I’ve seen several more complex prompts having ‘remnant’ functionality even with a new prompt setup in the same shell session.
@Plloi I've pushed a change that separates the setup function from the theme file (which should also improve compilation benefits), but that doesn't seem to be the issue. From what I can see this is due to other prompts not resetting RPROMPT
. If you switch to - say - "Eriner", the RPROMPT is overwritten and the cwd/git info is gone.
As long as there is no cleanup when switching prompts, there's not much a theme can do I guess.