This article's code does not work for me. I have pasted all its code to my .zshrc.
I have the following in my .zshrc
RPROMPT='%{\[0;33m%}%1v%{\[0m%}'
It should indicate whether you have jobs or not. However, it does not do that for me.
I would like to get an X to the right prompt to indicate that you have a job running.
How can you have a right prompt which shows X if you have more than one jobs in Zsh?
The code you're using won't work because it's trying to use the $psvar variable, which you haven't set. Probably that article mentioned it somewhere else.
Anyway, to display the number of jobs in the RPROMPT, use
$> RPROMPT="%j Job(s)"
To have it display an 'X' if you have at least one job running, use
$> RPROMPT="%1(j.X.)"
Look under the PROMPT section of the zshmisc manpage, or take a link: http://www.manpagez.com/man/1/zshmisc/ . It explains all the expansion sequences that you can use to display information in your prompt.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With