From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3164 invoked from network); 17 Sep 2001 09:40:59 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Sep 2001 09:40:59 -0000 Received: (qmail 23881 invoked by alias); 17 Sep 2001 09:40:32 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4227 Received: (qmail 23869 invoked from network); 17 Sep 2001 09:40:31 -0000 Date: Mon, 17 Sep 2001 11:23:44 +0100 From: Adam Spiers To: zsh-users@sunsite.dk Subject: Re: retrieving invocation arguments Message-ID: <20010917112344.A3210@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh-users@sunsite.dk References: <20010914214218.A23939@thelonious.new.ox.ac.uk> <1010915173427.ZM1780@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1010915173427.ZM1780@candle.brasslantern.com>; from schaefer@brasslantern.com on Sat, Sep 15, 2001 at 05:34:27PM +0000 X-Home-Page: http://www.new.ox.ac.uk/~adam/ X-OS: RedHat Linux Bart Schaefer (schaefer@brasslantern.com) wrote: > On Sep 14, 9:42pm, Adam Spiers wrote: > } What's the best way of retrieving the arguments with which zsh was > } invoked? [lots of remarkably helpful info snipped] It continually staggers me how helpful the zsh-users are. So many times I've seen a simple question asked, and answers come back in glorious detail. Thanks Bart and everyone else for this; I think it's a huge asset to zsh. > } It doesn't appear to be stored in any parameter set by the shell. > } Worth doing? > > It wouldn't be particularly difficult, but what's the application you > have in mind? Nothing more complex than being able type `restart' to restart the shell exactly how it was invoked. Currently I have restart () { exec $SHELL "$SHELL_ARGS" "$@" } and I do export SHELL_ARGS="$@" in my ~/.switch_shell (run from bash).