From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4673 invoked from network); 9 Oct 1997 18:15:53 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 9 Oct 1997 18:15:52 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id OAA02037; Thu, 9 Oct 1997 14:03:11 -0400 (EDT) Resent-Date: Thu, 9 Oct 1997 14:02:42 -0400 (EDT) X-Authentication-Warning: snoopy.ftlsol.com: tim set sender to Tim.Writer using -f Sender: tim@ftlsol.com To: TGAPE! Cc: zefram@tao.co.uk (Andrew Main), quinn@envy.ugcs.caltech.edu, zsh-users@math.gatech.edu Subject: Re: ideas, questions, and bugs (?) References: <199710082011.UAA00314@dal-tsa6-26.cyberramp.net> From: Tim Writer Date: 09 Oct 1997 13:57:52 -0400 In-Reply-To: TGAPE!'s message of Wed, 8 Oct 1997 20:11:56 +0000 (GMT) Message-ID: X-Mailer: Gnus v5.4.37/XEmacs 19.15 Resent-Message-ID: <"m2vjv2.0.7V.2nHFq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1069 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu TGAPE! writes: > >> Also, is it better to stick vars in zlogin and export them so future > >> shells inherit them, or put things like PATH, MANPATH, HOSTNAME, etc. in > >> zshenv? > > > > Put them in zshenv, and export if appropriate. > > Be sensible. EDITOR, HISTFILE, HISTSIZE, LESS, PAGER, VISUAL, and other > such environment variables shouldn't be in zshenv - they can only be > used in interactive shells. Of course, setting every environment Do you mean they belong in .zlogin? In my experience, this doesn't work very well in a networked environment, consider: rsh thathost xterm -display thishost:0.0 The shell running inside xterm is interactive, but it's not a login shell, so it won't have EDITOR, HISTFILE, etc. which is probably not what you want. Of course, you can use "xterm -ls", but not everybody uses xterm and terminal emulators such as shelltool don't have a similar option. > variable I set takes less than a second; it doesn't hurt *that* much > unless you have a *lot* of shell scripts that read /etc/zshenv. I agree with this. In practice, I find it's easier to put all this stuff in /etc/zshenv or ~/.zshenv and leave ~/.zlogin for things that are *strictly* part of logging in, starting X for example. > (I do - my zshenv contains all of my setopts in it, and most zsh scripts > want them.) > > Question: would it be possible to avoid this whole problem by re-writing > /sbin/init as a zsh script? That way, it can export all of the variables, > and so you don't need to worry about cron-executed programs having a > different environment. What about environment variables set in ~/.zshenv? Why not just put "zsh -l" in your crontab? -- Tim Writer Tim.Writer@ftlsol.com FTL Solutions Inc. Toronto, Ontario, CANADA