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

Re: Does zsh have equivalent to $PROMPT_COMMAND



> 	The only feature of bash i miss in zsh is the variable
> $PROMPT_COMMAND if set in .bashrc everytime you login for the entire
> session the command defined as the variable, is executed before each
> prompt.

Zsh does not have a $PROMPT_COMMAND variable, AFAIK. Instead, you can
define the precmd _function_ which is executed before each prompt.
Other special functions are listed in the zshmisc(1) man page.

Using a function for this is more logical than using a variable, IMHO.



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