Hi,
I want to get the output of a command in my prompt
(actually, I want the temperature of my cpu in RPS1 if it is superior
to a some predifined value).
So I have something like :
RPS1="%2v"
and
precmd() {
gettemp
}
with gettemp that gets temperature and puts it in psvar[2] if needed.
Today, I've seen in zsh user guide :
> Some people make the mistake of using it [precmd function] to set up a
> prompt, but there are enough ways of getting varying information into a
> fixed prompt string that you shouldn't do that unless you have very odd
> things in your prompt.
http://zsh.sunsite.dk/Guide/zshguide03.html#l51
But I didn't find a better way to do what I want. Did I miss something,
or is my goal something "very odd".
thanks
arno
Attachment:
signature.asc
Description: Digital signature