zsh-users
 help / color / mirror / code / Atom feed
* exit status problem
@ 2010-12-03 15:24 Vincent Lefevre
  2010-12-03 16:09 ` Peter Stephenson
  2010-12-20 11:34 ` Vincent Lefevre
  0 siblings, 2 replies; 18+ messages in thread
From: Vincent Lefevre @ 2010-12-03 15:24 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

I show the exit status in the prompt, and I have the following
reproducible problem when I do:

1. I type "false".
2. I type "sleep 1 &".
3. I increase the window width.
4. I type [Enter].

Until step 3, no problem (attached snapshot zshprompt1.png).
But after 4 (attached snapshot zshprompt2.png), the prompt has been
redisplayed with exit status 0. But the new prompt is OK.

My precmd function starts with:

  psvar[1]=$?
  if [[ $psvar[1] -gt 128 ]] then
    local sig=$signals[$(($psvar[1]-127))]
    [[ -n $sig ]] && psvar[1]=$sig
  fi

and I have:

  TRAPCLD() { [[ -o interactive && -n $TTY ]] && precmd }

and

  PS1="%m:%20<...<%~%<<%(?..${prefail}[%1v]${postfail})%2v%(#.#.>) "

Is this a zsh bug?

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)

[-- Attachment #2: zshprompt1.png --]
[-- Type: image/png, Size: 3660 bytes --]

[-- Attachment #3: zshprompt2.png --]
[-- Type: image/png, Size: 3867 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-12-25 15:07 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-03 15:24 exit status problem Vincent Lefevre
2010-12-03 16:09 ` Peter Stephenson
2010-12-04  1:03   ` Vincent Lefevre
2010-12-04 19:36     ` Bart Schaefer
2010-12-06 11:24       ` Vincent Lefevre
2010-12-06 11:36         ` Mikael Magnusson
2010-12-06 16:21         ` Bart Schaefer
2010-12-06 19:09           ` Vincent Lefevre
2010-12-07  4:16             ` Bart Schaefer
2010-12-07 12:24               ` Vincent Lefevre
2010-12-07 12:31                 ` Vincent Lefevre
2010-12-07 17:30                 ` Bart Schaefer
2010-12-08  2:14                   ` Vincent Lefevre
2010-12-20 11:34 ` Vincent Lefevre
2010-12-20 14:59   ` Peter Stephenson
2010-12-20 16:15     ` Bart Schaefer
2010-12-25 15:07       ` Vincent Lefevre
2010-12-25 14:51     ` Vincent Lefevre

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).