Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh not sourcing /etc/profile?



Alain Caron wrote:
[...]
> Even there, the behaviour is not the same as ksh.
[...]
> under ksh:
> 4> function foo { echo $0 }
> 5> foo
> foo
>
> under zsh :
[...]
> 6> function foo { echo $0 }
[...]
> 12> emulate ksh
[...]
> 14> foo
> zsh

Well, POSIX requires that $0 should always be the name used to invoke the
shell.  The latest ksh claims to be POSIX conformant...  Of course it is
possible to add a new option called something like SCRIPT_ARGZERO but that
would probably just further increase the confusion.

Zoltan



Messages sorted by: Reverse Date, Date, Thread, Author