From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18246 invoked by alias); 22 Aug 2011 01:00:23 -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: 29718 Received: (qmail 2331 invoked from network); 22 Aug 2011 01:00:12 -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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110821175951.ZM17752@torch.brasslantern.com> Date: Sun, 21 Aug 2011 17:59:51 -0700 In-reply-to: Comments: In reply to Jorg Sommer "auto-exec on last command" (Aug 21, 9:33pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: auto-exec on last command MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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? } 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 ...' ?