From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21419 invoked from network); 19 Aug 2001 19:13:14 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Aug 2001 19:13:14 -0000 Received: (qmail 9179 invoked by alias); 19 Aug 2001 19:13:00 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4145 Received: (qmail 9166 invoked from network); 19 Aug 2001 19:13:00 -0000 X-Authentication-Warning: localhost.nerim.net: lefevre set sender to vincent@vinc17.org using -f Date: Sun, 19 Aug 2001 21:12:46 +0200 From: Vincent Lefevre To: zsh-users@sunsite.dk Subject: Re: Broken /etc/zshrc ? Message-ID: <20010819211246.A2466@ay.nerim.net> Mail-Followup-To: zsh-users@sunsite.dk References: <20010819175147.A1889@ay.nerim.net> <1010819180607.ZM17395@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1010819180607.ZM17395@candle.brasslantern.com> User-Agent: Mutt/1.3.20i X-Mailer-Info: http://www.vinc17.org/mutt_eng.html On Sun, Aug 19, 2001 at 18:06:06 +0000, Bart Schaefer wrote: > I would think /etc/profile should be sourced in /etc/zprofile, if at all. Thanks, I've sent a mail to SuSE support about that. > /etc/zshenv is sourced by *every* zsh, even non-interactive scripts that > are started with "zsh -f". /etc/profile is intended to be sourced by > login shells. /etc/zshrc is sourced by login shells, but also by other > interactive shells. I'm not sure why so many linux distributors thought > that /etc/profile needed to be read from /etc/zshrc, but it seems to be > a common problem. Yes, I have a 6.x RedHat at my lab and there is the same problem. > } But /etc/profile sets the path (I think this is OK). Thus, if a > } user sets his path in his .zshenv, then this path is lost because > } /etc/zshrc is sourced after the user's .zshenv file. > > This would still be true with /etc/zprofile, unfortunately. So, is sourcing the /etc/profile a good idea? Shouldn't it be sourced only if the shell is a login shell? > You could put "source ~/.zshenv" in ~/.zshrc ... I don't like that very much. > or you could put "readonly path" in ~/.zshenv, The path is modified, but there are other problems (e.g. ls colors). > I suppose. Or in 4.0.x ~/.zshenv could start with > > setopt no_global_rcs This is what I currently do. > [[ -o login && -r /etc/zprofile ]] && source /etc/zprofile > [[ -o interactive && -r /etc/zshrc ]] && source /etc/zshrc > [[ -o login && -r /etc/zlogin ]] && source /etc/zlogin OK, if I need to read these files, I'll do this. -- Vincent Lefèvre - Web: - 100% validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des Jeux Mathématiques et Logiques, TETRHEX, etc. Work: CR INRIA - computer arithmetic / SPACES project at LORIA