Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: argzero while sourcing standard scripts
- X-seq: zsh-workers 2168
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: pws@xxxxxx (Peter Stephenson)
- Subject: Re: argzero while sourcing standard scripts
- Date: Tue, 24 Sep 1996 21:42:02 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199609161009.MAA19596@xxxxxxxxxxxx> from Peter Stephenson at "Sep 16, 96 12:09:10 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
Peter Stephenson wrote:
> Zsh doesn't set argzero (i.e. $0) while sourcing standard scripts,
> although it does when sourcing anything else so long as
> FUNCTIONARGZERO is set (which it is by default for native emulation
> and I can't think of a good reason for turning it off for a `real'
> zsh). This means the error messages from standard scripts are rather
> unhelpful in that you don't get the name of the script with the error.
It is certainly wrong that the filename isn't mentioned in the error
message but setting argzero it probably the wrong solution for that. One
may want to invoke zsh under different names to get customized behaviour.
In the startup files $0 can be used to decide the prefered option settings
etc. OK, the ZSH_NAME parameter can be used for that. But when you
execute a script $0 is set to the script name which can be used in zshenv.
Setting $0 to zshenv would make it impossible to get the name of the script
we are executing.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author