Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh not sourcing /etc/profile?
- X-seq: zsh-workers 3074
- From: <hzoli@xxxxxxxxxxxx> (Zoltan T. Hidvegi)
- To: coleman@xxxxxxxxxxxxxxx (Richard Coleman)
- Subject: Re: zsh not sourcing /etc/profile?
- Date: Mon, 14 Apr 1997 14:45:49 -0400 (EDT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <rcn2r18prf.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx> from Richard Coleman at "Apr 14, 97 01:42:44 pm"
Richard Coleman wrote:
> I found this article on comp.unix.shells. I thought I would
> pass it along.
[...]
> > posix-sh, ksh, and bash all return the name of the shell for $0 when
> > sourcing a file.
> >
> > Only zsh returns the name of the file being sourced. I suspect the
> > right behaviour is to return the shell name. The reason for this is
> > that sourcing a file does not create a new process, it should behave
> > as if the file had been typed from the keyboard. If you type the
> > command "echo $0" at the prompt, it should return the shell name.
> > Although I really like zsh, I think it does not have the right
> > behaviour because you can't rely on $0 to determine which shell is
> > interpreting the file.
Under zsh this is controlled by the FUNCTION_ARGZERO option, which is set
when zsh is started as sh/ksh.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author