Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: retrieving invocation arguments
- X-seq: zsh-users 4227
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: retrieving invocation arguments
- Date: Mon, 17 Sep 2001 11:23:44 +0100
- In-reply-to: <1010915173427.ZM1780@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxx on Sat, Sep 15, 2001 at 05:34:27PM +0000
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010914214218.A23939@xxxxxxxxxxxxxxxxxxxxxxx> <1010915173427.ZM1780@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx) 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).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author