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

Re: precmd, preexec, and supplied prompt themes



On Fri, Oct 12, 2007 at 02:47:23PM -0700, William Scott wrote:
> Is there a simple way to prepend or append additional arguments to these 
> (or any) functions?  I've been doing something like this, but it seems 
> hackish:

Check out the zsh man page, section SPECIAL FUNCTIONS, or just search
for 'hook function'.  The long and short of it is that the prompt
themes should be using

typeset -a precmd_functions
precmd_functions += my_prompt_precmd

and

typeset -a preexec_functions
preexec_functions += my_prompt_preexec

If you're talking about prompt themes supplied with zsh, I would
consider it a bug in the package if those aren't defined that way.

~Matt



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