From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3633 invoked from network); 7 Sep 2001 22:30:25 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Sep 2001 22:30:25 -0000 Received: (qmail 18616 invoked by alias); 7 Sep 2001 22:30:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15750 Received: (qmail 18588 invoked from network); 7 Sep 2001 22:30:16 -0000 From: Bart Schaefer Message-Id: <010907152846.ZM18111@candle.brasslantern.com> Date: Fri, 7 Sep 2001 15:28:46 -0700 In-Reply-To: <20010907234517.A6901@thelonious.new.ox.ac.uk> Comments: In reply to Adam Spiers "Re: Switching shell safely and efficiently" (Sep 7, 11:45pm) References: <20010907193550.A5678@thelonious.new.ox.ac.uk> <1010907190526.ZM17902@candle.brasslantern.com> <20010907234517.A6901@thelonious.new.ox.ac.uk> X-Mailer: Z-Mail Lite (5.0.0 30July97) To: Adam Spiers , zsh-workers@sunsite.dk Subject: Re: Switching shell safely and efficiently MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 7, 11:45pm, Adam Spiers wrote: > Subject: Re: Switching shell safely and efficiently > Bart Schaefer (schaefer@brasslantern.com) wrote: > > run_shell=`$myshell -c "echo exec $myshell" || echo :` > > eval $run_shell '"$@"' Now that I think about it, that could be just: eval `$myshell -c "echo exec $myshell" || echo :` '"$@"' > more stylish than my attempt, it's not quite as efficient through > having to fork the shell before running it properly. To this end, a > slight improvement might be skipping start-up files I knew you were going to say that. I chose to omit the -f in case the contents of the startup files are what causes the shell to fail. You did want safety ...