From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12602 invoked by alias); 14 Dec 2009 23:15:40 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27519 Received: (qmail 12478 invoked from network); 14 Dec 2009 23:15:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at alea.gnuu.de designates 83.246.114.63 as permitted sender) X-DKIM: Sendmail DKIM Filter v2.5.2 uucp.gnuu.de E7E40488074 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuu.de; s=banki; t=1260832534; i=@alea.gnuu.de; bh=39/kLLEe9r+I+mR8ZlIxbG9PpsM0EGKmQ C03pvTC0aQ=; h=To:From:Subject:Date:Message-ID:Mime-Version: Content-Type:Content-Transfer-Encoding:Sender; b=P0vHq//rBSjM/tZ4X p9V2tYjKU1K5J0cV6oBchclCBYyc4HuljGAdiiocwehTUZC8azHPPgTNGLOu8GmqVX/ czOXw/IPp/UY7BHcHquvWVgBxI9cpV+gbIUn1jwkRk9W8lNVS8yXz15fu386nDe2E9f MjlgN8PAIAFecpe9puic= To: zsh-workers@zsh.org Path: not-for-mail From: =?UTF-8?Q?J=C3=B6rg?= Sommer Newsgroups: local.mailinglist.zsh Subject: What's the last command in prompt expansion? Date: Mon, 14 Dec 2009 22:53:33 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: alea.gnuu.de 1260831213 9307 192.168.0.5 (14 Dec 2009 22:53:33 GMT) X-Complaints-To: usenet@alea.gnuu.de User-Agent: slrn/pre1.0.0-11 (Linux) Sender: news Hi, what should be the expansion of %? in the prompt, the return code of the last command run at the prompt or the return code of the last command run by zsh? I've a function triggered via TRAPALARM that modifies PS1, by resetting its value and running zle reset-prompt. After the first time this function was executed the return value isn't the one of the last command, e.g. it's not 1 after executing false. Do I have to save the return value and put the value into PS1? Regards, Jörg. -- “Politics is for the moment, equations are forever” (Albert Einstein)