Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Latest stable release of zsh triggers the addition of paths to $PATH



>>>>> On March 13, 2013 James Jong <ribonucleico@xxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author