From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15307 invoked by alias); 14 Jan 2016 17:16:34 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37626 Received: (qmail 14021 invoked from network); 14 Jan 2016 17:16:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.0 Date: Thu, 14 Jan 2016 18:16:31 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: prompt update and TRAPCHLD Message-ID: <20160114171631.GC12351@cventin.lip.ens-lyon.fr> Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.24-6551-vl-r83103 (2016-01-05) 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 - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)