Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: exit status problem
- X-seq: zsh-users 15609
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: exit status problem
- Date: Mon, 6 Dec 2010 12:36:06 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=4z6svpIK36sRZyOSf1RqFV4JJR3WrDud2GncrJ/ZO+E=; b=nto+cKi1oRdncXeywe6D0rmmPaCkws8P2zgMfnlL8A4h1VfdcMD0L9TD90AhRXpWYl GJh1a5j6aPLfiysRjprGVj24/9dtCSS6Cxybw8iRAG6HWaCTmtzPKYPwtbAK87Xp9FdY GBXKn7FPxYbeGCyY4Lbmh06kDRRKlMjJdK6O8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=CduBFxSJBbMPQYEx5nc9n7bX7tjrHRvnoXYyVT2xPF3LcXw7zMywaYIJTpGpLotbuW AZGfKrXCOZ6xHarj+7E3kPVAC6fwHuJAA8DlPqZt9Mnhld9YXEq6SPPi9TxyLsQJ9ZZv z5CaTKPL32LGs6fbJ/j/HnIt5OiRkXoBJHjfc=
- In-reply-to: <20101206112436.GN1727@xxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.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 6 December 2010 12:24, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> 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.
Do you get the same results with an unset RPS1? Maybe recalculating
the position of the right prompt also does something else as a side
effect.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author