Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: precmd, preexec, and supplied prompt themes
- X-seq: zsh-users 11997
- From: wgscott@xxxxxxxxxxxxxxxxxx
- To: Matthew Wozniski <godlygeek@xxxxxxxxx>
- Subject: Re: precmd, preexec, and supplied prompt themes
- Date: Fri, 12 Oct 2007 15:22:57 -0700
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20071012215906.GA8935@mastermind>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <DD973F2C-E6A0-4FCA-96F5-6C96701DC677@xxxxxxxxxxxxxxxxxx> <20071012215906.GA8935@mastermind>
On Fri, 12 Oct 2007 17:59:06 -0400
Matthew Wozniski <godlygeek@xxxxxxxxx> wrote:
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
Thanks. That seems like a good approach.
These for example all appear to just define a precmd function:
prompt_bigfade_setup
prompt_elite2_setup
prompt_elite_setup
prompt_fade_setup
prompt_fire_setup
prompt_off_setup
prompt_redhat_setup
prompt_suse_setup
prompt_zefram_setup
The adam1,2, bart and clint ones seem to be doing something else that I suspect is designed to prevent clobbering the function.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author