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

RE: PATCH: Re: adding a toplevel zsh.spec.in file



>
> /etc/profile is there to set up bits of the environment that
> pertain to
> the local system.  It's an adjunct to login; it does the new
> mail check
> on systems where login doesn't, it sets MAIL if login
> doesn't, and it can
> set TAPE and stuff if that's really necessary on that system.
>  My point is
> that the things that need to be done are the same regardless
> of what shell
> the user prefers to use, and so there shouldn't be any
> zsh-specific stuff.
>
> Andrej Borsenkow wrote:
>
> Perhaps we can locally emulate sh when sourcing /etc/profile?  We have
> the local emulation logic working for functions, and
> /etc/profile can't
> possibly get confused by that, because it can't contain any setopt
> commands.  The $0 issue remains.  What does $0 get examined for?
>


Pretty much everything that you described above + output of /etc/motd,
setting terminals parameter depending of terminal type (there are
several standard ones that are normally shipped with systems) happens
under

case $0 in
  -sh|-ksh|-jsh|-rsh)

Do not ask me why; I have not written it and have no chance to change
it. Actually, since I'm running under X I do not care about /etc/profile
anymore; it is sourced by Xsession so environment gets set up anyway (to
account for optional software that may add something to /etc/profile)
and I do not care about setting terminal under dtterm :-)

So, unless this is an issue on more than one system, we can probably
ignore it. But if we are going to locally emulate /bin/sh - why not
pretend, we *are* -sh? :-)

-andrej



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