Closed edemaine closed 2 years ago
@edemaine Thank you for the observation. I think we can do exactly what you describe using the TRAPCHLD
function. I've uploaded changes to the develop
branch of this repository; could you let me know if the prompt now works the way you want it to? I'll do a little research and make sure there won't be any unintended consequences.
It looks to me, actually, as if the prompt expansion element %j
, which I should have used instead of psvar[11]
, does update nicely. Rather than trying to do heroics with traps, I think I'll deprecate psvar[11]
and just use %j
and encourage people to use it in their custom prompts.
OK. That should be fixed. Thanks for helping me to catch that at such an early date.
Just confirmed that the new master branch works great! Thanks for the fix!
No problem.
I was excited to try out the new background job indicator status. In most cases, it works great! However, it doesn't seem to update when the number of jobs changes dynamically without any user input, even though zsh displays the "done" message and redisplays the prompt:
On the other hand, the prompt updates fine when the count changes between commands. For example:
Does zsh call a callback when a job gets completed? If so, it should be easy to update the prompt then, which would make it nicer. If not, this may be impossible to fix (not a huge deal).