From: James Jong <ribonucleico@gmail.com>
To: gak@klanderman.net
Cc: zsh-users@zsh.org
Subject: Re: Latest stable release of zsh triggers the addition of paths to $PATH
Date: Thu, 14 Mar 2013 09:40:31 -0400 [thread overview]
Message-ID: <CAD4ivxWrLbSg6hz7=Wd20U7nShgBK=X=fJ40fdZv9r6z==sNcQ@mail.gmail.com> (raw)
In-Reply-To: <87ppz3ow4x.fsf@lwm.klanderman.net>
[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]
Thanks Greg! These are fantastic pointers.
As for the if statement, I was referring to the first one, i.e.
if [ "x$SHLVL" != "x1" ]; then
...
fi
But I think this thread answers my question:
http://stackoverflow.com/questions/4511407/how-do-i-know-if-im-running-a-nested-shell
James
On Wed, Mar 13, 2013 at 4:57 PM, Greg Klanderman <gak@klanderman.net> wrote:
> >>>>> On March 13, 2013 James Jong <ribonucleico@gmail.com> 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
>
next prev parent reply other threads:[~2013-03-14 13:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 22:08 James Jong
2013-03-12 22:18 ` Lawrence Velázquez
2013-03-12 22:26 ` James Jong
2013-03-13 0:20 ` Lawrence Velázquez
2013-03-13 20:43 ` James Jong
2013-03-13 20:57 ` Greg Klanderman
2013-03-14 13:40 ` James Jong [this message]
2013-03-12 22:19 ` Nikolai Weibull
2013-03-13 0:17 ` Phil Pennock
2013-03-13 0:20 ` Vincent Lefevre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAD4ivxWrLbSg6hz7=Wd20U7nShgBK=X=fJ40fdZv9r6z==sNcQ@mail.gmail.com' \
--to=ribonucleico@gmail.com \
--cc=gak@klanderman.net \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).