Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [RFC][PATCH] Reset ZLE hooks when changing prompt themes (was Re: [RFC][PATCH] `newuser` prompt theme)



On Fri, Apr 16, 2021 at 3:38 PM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> Attached is a new version of the patch that handles _all the things._ \o/

This looks OK, with two questions:
1.  Subshells have been introduced.  Those won't be treated as
interactive shells.  Does that matter?
2.  This bit in the restore style:
+        $( add-zsh-hook -L )
+        $( add-zle-hook-widget -L )
There may not be anything to be done about this, but unless I'm
mistaken that just re-adds all the previous hooks, it doesn't remove
any?  The code it is replacing clobbered the entire list of precmd and
preexec hooks, which I suppose also might also be wrong if anything
other than the prompt theme was manipulating them.




Messages sorted by: Reverse Date, Date, Thread, Author