From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25070 invoked by alias); 22 Aug 2011 21:33:53 -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: 29719 Received: (qmail 8525 invoked from network); 22 Aug 2011 21:33:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_PASS autolearn=ham version=3.3.1 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 C6EF0488069 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuu.de; s=banki; t=1314048816; i=@alea.gnuu.de; bh=ZOqMT/xzjuCIf+cxM/Q/AVaWplQO+1FVD 91Xo43s9rI=; h=To:From:Subject:Date:Message-ID:References: Mime-Version:Content-Type:Content-Transfer-Encoding:Sender; b=tlsh ti8YebhBfPRUbIppCskbMfn3/fxx8xC4Z9l4D99rL9+os6RyQojnjdGtbt2FNEOdXUL lVhmpTkWKwcNDTxXoeq8Y2aeaDykHzqVa78WDFogEkaEoKV99Nq9UDESmNieTu8KPI4 vTt3iq6GFfr2M2mczMhgAAkIY0IjUpPlw= To: zsh-workers@zsh.org Path: not-for-mail From: =?UTF-8?Q?J=C3=B6rg?= Sommer Newsgroups: local.mailinglist.zsh Subject: Re: auto-exec on last command Date: Mon, 22 Aug 2011 21:33:01 +0000 (UTC) Message-ID: References: <110821175951.ZM17752@torch.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: alea.gnuu.de 1314048781 26008 192.168.0.5 (22 Aug 2011 21:33:01 GMT) X-Complaints-To: usenet@alea.gnuu.de User-Agent: slrn/pre1.0.0-18 (Linux) Sender: news Bart Schaefer wrote: > On Aug 21, 9:33pm, Jorg Sommer wrote: >} >} is it possible to advice zsh to replace its process (with exec) with >} the process of the last command? > > How is the shell supposed to know what command is the "last" one? Because the next token is EOF and no TRAPs are defined. >} Something like zsh -c 'setopt execlast; $myprog' or zsh -Xc '$myprog' >} that runs the script 'exec $myprog'. > > I'm a bit puzzled. If you know to set the option or pass the flag, why > can't you just use "zsh -c 'exec ...' ? Take cron for example. Modifying the SHELL variable would be easy, but changing all entries is much more work. Or the window manager IceWM. I can configure the shell that's used to run subprocesses for menu entries, but modifying all menu entries, and some of them are build by third party scripts, is expensive. Bye, Jörg. -- Gienger's Law (http://www.bruhaha.de/laws.html): Die Wichtigkeit eines Newspostings im Usenet ist reziprok zur Anzahl der enthaltenenen, kumulierten Ausrufungszeichen.