Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: What's the last command in prompt expansion?
- X-seq: zsh-workers 27533
- From: JÃrg Sommer <joerg@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: What's the last command in prompt expansion?
- Date: Fri, 18 Dec 2009 16:45:16 +0000 (UTC)
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuu.de; s=banki; t=1261177945; i=@xxxxxxxxxxxx; bh=zVRPdKSO2NGtODVPHygMbXVIwHl05ZN0h bKZW09Udo0=; h=To:From:Subject:Date:Message-ID:References: Mime-Version:Content-Type:Content-Transfer-Encoding:Sender; b=vGqH rC/DK+mnIv6pjjvAvsJ0C8/86sX0xQedg0o39nn5/xexbmBFmCWTDiuguLkftxxaeVc 3Z3/V22/SsQscmOxstlnUs0utJcfs1o0Zqa3zRDy+jbSWv+f42qOfLudo61VfMRUeVV QvaCgXXA1OwC7HA9hD9BbhUvm7XqlmlcE=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <slrnhidgfb.2pm.joerg@xxxxxxxxxxxx> <200912151002.nBFA2Ve3029420@xxxxxxxxxxxxxx> <20091215102309.640a5a14@news01>
- Sender: news <news@xxxxxxxxxxxx>
Hallo Peter,
Peter Stephenson <pws@xxxxxxx> wrote:
> On Tue, 15 Dec 2009 10:02:31 +0000
> Peter Stephenson <pws@xxxxxxx> wrote:
>> Traps don't save and restore the status. This is deliberate, they are
>> supposed to be able to return a status to the surrounding environment.
>
> Actually, I've overstated the case here. If a trap function doesn't
> execute a "return" explicitly, the status should be maintained unless there
> was an error. So in general your TRAPALRM ought not to change it.
The problem is not the return value of TRAPALRM, but the change of PS1.
% zsh -f
ibook% PS1='%? %% '
0 % TRAPALRM() { PS1=$PS1; zle reset-prompt; TMOUT=0; }
0 % TMOUT=1; false
0 %
Bye, JÃrg.
--
Es ist auÃerdem ein weit verbreiteter Irrtum das USENET âhelfenâ soll.
TatsÃchlich wurde USENET nachweislich zur persÃnlichen Belustigung
seiner Erfinder geschaffen.
JÃrg Klemenz <joerg@xxxxxxx>, <b4ai4o$1u8vmt$2@xxxxxxxxxxxxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author