From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17229 invoked from network); 27 Aug 2001 20:41:55 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Aug 2001 20:41:55 -0000 Received: (qmail 14695 invoked by alias); 27 Aug 2001 20:41:38 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4172 Received: (qmail 14683 invoked from network); 27 Aug 2001 20:41:36 -0000 From: Bart Schaefer Message-Id: <1010827204123.ZM830@candle.brasslantern.com> Date: Mon, 27 Aug 2001 20:41:23 +0000 In-Reply-To: <20010827153804.A16051@panix.com> Comments: In reply to Russell Hoover "Do I really need a .zshenv?" (Aug 27, 3:38pm) References: <20010827153804.A16051@panix.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Russell Hoover , zsh-users@sunsite.dk Subject: Re: Do I really need a .zshenv? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 27, 3:38pm, Russell Hoover wrote: } } I'd like to move everything that's in my ~/.zshenv over into my ~/.zshrc. } } Is ~/.zshrc sourced *only* in interactive shells and not on *all* } invocations of the shell (as ~/.zshenv is)? Yes, .zshrc (and /etc/zshrc) is for interactive shells only. /etc/zprofile, ~/.zprofile, /etc/zlogin and ~/.zlogin are for *login* shells only. It's possible in some odd circumstances to have a login shell that is not interactive -- for example, some X11 display managers run their initial X client startup scripts via such a shell (I believe the Gnome desktop does this; it drove me nuts trying to figure out why my X session was exiting before it ever got started, and it turned out that I was assuming login shells were interactive at one unfortunate point in .zprofile). } If so, how much (why) would that matter to me? (scripts, etc?) Scripts, processes started on a remote machine with `rsh' or `xon', and the aforementioned X11 display manager startups could all have different behavior if the environment were set up entirely in .zshrc. Whether that matters to you depends on what sorts of commands you run this way. Also, if the environment has already been set up properly by zprofile or zlogin, there may be no need to reset it every time a new interactive shell starts up. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net