Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Switching shell safely and efficiently
- X-seq: zsh-workers 15749
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Switching shell safely and efficiently
- Date: Fri, 7 Sep 2001 23:45:17 +0100
- In-reply-to: <1010907190526.ZM17902@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxx on Fri, Sep 07, 2001 at 07:05:26PM +0000
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010907193550.A5678@xxxxxxxxxxxxxxxxxxxxxxx> <1010907190526.ZM17902@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx) wrote:
> run_shell=`$myshell -c "echo exec $myshell" || echo :`
> eval $run_shell '"$@"'
Cute trick! Nice enough to put in the FAQ, I think. Although much
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:
run_shell=`$myshell -f -c "echo exec $myshell" || echo :`
eval $run_shell '"$@"'
I haven't done any benchmarking of the different approaches though.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author