Zsh Mailing List Archive
Messages sorted by:
Re: exit status problem
- X-seq: zsh-users 15623
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: exit status problem
- Date: Mon, 06 Dec 2010 08:21:42 -0800
- In-reply-to: <20101206112436.GN1727@xxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20101203152438.GL1727@xxxxxxxxxxxxxxxxxxx> <20101203160916.42e78913@xxxxxxxxxxxxxxxxxxxxxxxxx> <20101204010313.GM1727@xxxxxxxxxxxxxxxxxxx> <101204113617.ZM6156@xxxxxxxxxxxxxxxxxxxxxx> <20101206112436.GN1727@xxxxxxxxxxxxxxxxxxx>
On Dec 6, 12:24pm, Vincent Lefevre wrote:
} > The status you're displaying is $? stored in psvar, correct? And
} > that's set by precmd, and you're explicitly calling precmd
} > If I use %? instead, I get consistent behavior
} What I don't understand is that if the problem is due to the precmd
} call from TRAPCLD, then why do I get
} ypig:~> <12:15:32
}  + done sleep 5
} ypig:~> <12:15:35
It results from the timing of the trap handling. The prompt is
reprinted because of the " + done" output before the CLD trap is
called; zsh does its internal signal handling before user traps.
Then on window resize the prompt is recomputed a second time, but this
time it's after your trap handler has run precmd.
} and why do I get "ypig:~>" only after a window resize *and*
} typing [Enter].
If I poke something into RPS1 in a trap handler and then resize the
window, I see the change from the trap as soon as the window is
resized, not later after typing Enter. But my xterm sends a stream
of SIGWINCH at the process underneath, it doesn't wait until I stop
resizing and then send the signal once. Might that matter?
} If I do not resize the window, the prompt is not changed.
There is something confusing about the screen shots you first sent.
If those are in fact consecutive shots of the same terminal session,
as they appear to be, then it also appears that your prompt was
at 15:59:59 *after* the screen resize, and then was *overwritten* at
after which at 16:00:37 the prompt with  returns. My question is,
what happened between 15:59:59 and 16:00:03 that caused the prompt to be
"updated in place"? If all you did was hit Enter, the new prompt should
have appeared *below* the old one, not on top of it.
Messages sorted by: