Subject: prompt update and TRAPCHLD
From: Vincent Lefevre <[email-masked]>
To: [email-masked]
Date: Thu, 14 Jan 2016 18:16:31 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

There seems to be a bug in the prompt update. The change of psvar[1]
in TRAPCHLD is not taken into account for the next prompt display,
but for the following one.

cventin% PS1="%*-%1v%% "
18:15:11-% TRAPCHLD() { psvar[1]=$RANDOM }
18:15:17-% sleep 3 & sleep 5 & sleep 7 &
[1] 29121
[2] 29122
[3] 29123
18:15:25-% 
[1]    done       sleep 3
18:15:28-% 
[2]  - done       sleep 5
18:15:30-32134% 
[3]  + done       sleep 7
18:15:32-30185% 
18:15:35-25600% 
18:15:36-25600% 
18:15:37-25600% 
18:15:39-25600% 

-- 
Vincent Lefèvre <[email-masked]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)