Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: update prompt themes
- X-seq: zsh-workers 25061
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: update prompt themes
- Date: Sat, 17 May 2008 18:35:10 -0700
- In-reply-to: <4430.1211063817@pws-pc>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <4430.1211063817@pws-pc>
On May 17, 11:36pm, Peter Stephenson wrote:
}
} - Overhaul of use of precmd and preexec. Use the hook functions
} designed for exactly this purpose so as not to trash any existing
} use of the functions.
Good plan, but:
} - functions[precmd]="${functions[precmd]//prompt_bart_precmd}"
} + precmd_functions[(r)prompt_*_precmd]=
} + precmd_functions=($precmd_functions)
I'm curious why the second assignment is necessary there. Remove an
empty element? Couldn't you just do this?
precmd_functions[(r)prompt_*_precmd]=()
Or perhaps better
add-zsh-hook -D precmd 'prompt_*_precmd'
(Or do I misunderstand the -D option you added?)
} # Abuse the fg assoc to hold our selected colors ...
} - fg[%m]=$fg[${1:-red}]
Er, the fg assoc came from Functions/Misc/colors which you're no longer
including, so it's no longer "abuse" to do this to the $fg that you've
declared global in this same function.
All of the above is in prompt_bart_setup ... I skimmed the other diffs
but didn't try as hard to understand what they were doing.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author