Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: precmd, preexec, and supplied prompt themes
- X-seq: zsh-workers 23949
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: precmd, preexec, and supplied prompt themes
- Date: Sat, 13 Oct 2007 18:16:50 +0100
- In-reply-to: Message from Clint Adams <clint@xxxxxxx> of "Sat, 13 Oct 2007 09:30:57 EDT." <20071013133057.GA1500@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Clint Adams wrote:
> > typeset -a precmd_functions
(Would probably need to be "typeset -ga ...")
> > precmd_functions += my_prompt_precmd
>
> Since there is no unregistration hook, how would you avoid the problem
> of precmd_functions containing (my_prompt_precmd her_prompt_precmd
> his_prompt_precmd my_prompt_precmd) when switching back and forth?
Presumably either you would add an unregistration hook when you gave the
system the clean-up it needs, or more simply you would remove all
existing entries of the form *_prompt_precmd from precmd_functions when
you added a new one and enforce that format. Without some form of
tidy-up the question is somewhat moot.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author