From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galapagos.cse.psu.edu ([130.203.12.17]) by hawkwind.utcs.toronto.edu with SMTP id <48116>; Thu, 14 Feb 2002 22:22:22 -0500 Received: (qmail 14311 invoked by uid 991); 15 Feb 2002 03:21:29 -0000 Message-ID: <20020215032129.14309.qmail@g.bio.cse.psu.edu> To: Byron Rakitzis cc: pk@TechFak.Uni-Bielefeld.DE, rc@hawkwind.utcs.toronto.edu Subject: Re: non login "rc" needs customized environment In-Reply-To: Message from Byron Rakitzis of "Thu, 14 Feb 2002 12:44:05 EST." <200202141744.g1EHi5I04374@rakitzis.com> Date: Thu, 14 Feb 2002 22:21:29 -0500 From: Scott Schwartz | This behavior with rsh has always been a problem -- csh gets around | it with .cshrc, and I wonder if some similar solution might be necessary | for backward compatability. Take a look at what zsh does. There are lots of cases one might want to handle, once you start in with different config files: STARTUP/SHUTDOWN FILES Commands are first read from /etc/zshenv. If the RCS option is unset within /etc/zshenv, all other initialization files are skipped. Otherwise, commands are read from $ZDOTDIR/.zshenv. (If ZDOTDIR is unset, HOME is used instead). If the first character of argument zero passed to the shell is -, or if the -l flag is present, then the shell is assumed to be a login shell, and commands are read from /etc/zprofile and then $ZDOTDIR/.zprofile. Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc. Finally, if the shell is a login shell, /etc/zlogin and $ZDOTDIR/.zlogin are read. | I love the SHLVL hack, but if you put it in place, then rc will now | process .rcrc differently across different versions of the shell, and | I'd prefer some backward compatability if at all possible. SHLVL leaves me cold. The issue is how to tell a shell to do some initialization---nesting level should be conceptually infinite, and shouldn't effect that.