Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: exit status problem
- X-seq: zsh-users 15608
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: exit status problem
- Date: Mon, 6 Dec 2010 12:24:36 +0100
- In-reply-to: <101204113617.ZM6156@xxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20101203152438.GL1727@xxxxxxxxxxxxxxxxxxx> <20101203160916.42e78913@xxxxxxxxxxxxxxxxxxxxxxxxx> <20101204010313.GM1727@xxxxxxxxxxxxxxxxxxx> <101204113617.ZM6156@xxxxxxxxxxxxxxxxxxxxxx>
On 2010-12-04 11:36:17 -0800, Bart Schaefer wrote:
> } 2. I type "sleep 5 &".
> } 3. I type "false".
> } 4. I increase the window width.
> } 5. I type [Enter].
>
> The status you're displaying is $? stored in psvar[1], correct? And
> that's set by precmd, and you're explicitly calling precmd again on
> TRAPCLD, rather than allowing it to be called in the proper context
> with global status manipulated as it would be at hook time.
>
> If I use %? instead, I get consistent behavior, that is, the status
> shown in the prompt never changes on window resize. So I have to
> conclude that this is an effect you've introduced.
What I don't understand is that if the problem is due to the precmd
call from TRAPCLD, then why do I get
ypig:~[1]> <12:15:32
[1] + done sleep 5
ypig:~[1]> <12:15:35
and not
ypig:~[1]> <12:15:32
[1] + done sleep 5
ypig:~[0]> <12:15:35
and why do I get "ypig:~[0]>" only after a window resize *and*
typing [Enter]. If I do not resize the window, the prompt is not
changed.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - 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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author