Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: auto-exec on last command
- X-seq: zsh-workers 29719
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: auto-exec on last command
- Date: Mon, 22 Aug 2011 21:33:01 +0000 (UTC)
- 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=
- 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: <slrnj52udp.hlv.joerg@alea.gnuu.de> <110821175951.ZM17752@torch.brasslantern.com>
- Sender: news <news@xxxxxxxxxxxx>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author