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

Re: precmd, preexec, and supplied prompt themes



On Fri, 12 Oct 2007 20:27:21 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
    
     These are fine prompts, but they aren't quite themes, yet.


Well, that pretty much ensured I wouldn't get any work done this weekend.
     
I've tried to whip my "simple" prompt into shape.  I think it is almost there, but I am
having two difficulties that I am afraid I need to ask help with:

 http://xanana.ucsc.edu/Library/init/zsh/local-functions/general/prompt_simple_setup

The first is that the prompt_simple_preview function doesn't work.

The second, and more fundamental one, is that I can't get the dynamic updating to work
unless I issue these six lines in the shell itself, in addition to the prompt function:

	typeset -a preexec_functions
	preexec_functions+=mypreexec

	typeset -a precmd_functions
	precmd_functions+=myprecmd

	typeset -a chpwd_functions
	chpwd_functions+=mychpwd

After I do that, it all works fine.  But I can't seem to do this from within a function, which leads me to believe I am missing something obvious (that I can't find in the manual -- sorry).

Thanks.

Bill Scott





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