From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2130 invoked from network); 6 Nov 2000 07:01:52 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Nov 2000 07:01:52 -0000 Received: (qmail 13546 invoked by alias); 6 Nov 2000 07:01:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13124 Received: (qmail 13539 invoked from network); 6 Nov 2000 07:01:41 -0000 From: "Bart Schaefer" Message-Id: <1001106065959.ZM11686@candle.brasslantern.com> Date: Mon, 6 Nov 2000 06:59:59 +0000 In-Reply-To: <1001105223736.ZM1787@candle.brasslantern.com> Comments: In reply to "Bart Schaefer" "PATCH: Run builtins, functions, etc. under zpty" (Nov 5, 10:37pm) References: <1001105223736.ZM1787@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Run builtins, functions, etc. under zpty MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 5, 10:37pm, Bart Schaefer wrote: } } This patch copies code from the clone module into newptycmd(), so that the } forked process set up on the pty is initially a clone of the current shell. } Then instead of calling execve(), the command can be parsed and executed } with execode(). I forgot that this requires a change to nslookup. Also, I committed a tweak to newptycmd() after sending the patch in 13123, to unset `interactive' in the cloned shell before calling execode(). This seems like the right thing to do; the clone itself isn't interactive any more, even if the command it's eval'ing probably is, and it prevents the saving of history or sourcing of .zlogout should an `exec' or `exit' be performed in the clone. (Patch for that not included here, it's in CVS.) Index: Functions/Misc/nslookup =================================================================== @@ -24,7 +24,7 @@ [[ -z "$pager" ]] && pager="${opager:-more}" (( $#pmpt )) || pmpt=(-p '> ') -zpty nslookup nslookup "$@" +zpty nslookup command nslookup "${(q)@}" zpty -r nslookup line '* > ' -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net