From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28363 invoked by alias); 13 Mar 2013 20:58:03 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17694 Received: (qmail 9257 invoked from network); 13 Mar 2013 20:57:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at klanderman.net does not designate permitted sender hosts) From: Greg Klanderman To: zsh-users@zsh.org Subject: Re: Latest stable release of zsh triggers the addition of paths to $PATH Reply-to: gak@klanderman.net Date: Wed, 13 Mar 2013 16:57:50 -0400 In-reply-to: (James Jong's message of "Wed, 13 Mar 2013 16:43:20 -0400") Message-id: <87ppz3ow4x.fsf@lwm.klanderman.net> User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) References: <7054F6AC-DD66-4174-A199-D30DBF5E5E4A@macports.org> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii >>>>> On March 13, 2013 James Jong wrote: > 1) What doest the if statement above test? whether the file is readable. the loop loads all readable files matching the pattern /etc/profile.d/*.sh > 2) When I run a zsh script, how can I prevent it from running /etc/zshrc? zsh -f > 3) When I switch to zsh from tcsh on an interactive shell using exec zsh -l, > how I can I prevent it from running /etc/zprofile? I use "setopt norcs" in my .zshenv and then specifically load the files I want to load depending on whether the shell is a login shell, interactive, etc. You could also use "setopt noglobalrcs" which only prevents loading the global (/etc/...) ones. Note that without the "-f" command-line option, you cannot prevent loading /etc/zshenv (alternately /etc/zsh/zshenv on some systems). Greg