zsh-users
 help / color / mirror / code / Atom feed
From: Sweth Chandramouli <sweth@astaroth.nit.gwu.edu>
To: ZSH Users <zsh-users@math.gatech.edu>
Subject: init files
Date: Sun, 9 Aug 1998 15:08:05 -0400	[thread overview]
Message-ID: <19980809150805.47993@astaroth.nit.gwu.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]

	okay, i've been playing around with the init files that
zsh uses, trying to figure out which ones get invoked when, and i 
think i've got it all mostly worked out; the flowchart i've made 
is attached to this message.  i still have some questions, though.
there was a thread about this maybe a year ago, wherein bart (i 
think) had said that the NO_RCS option was checked before the
sourcing of /etc/zshrc and $ZDOTDIR/.zshrc; no matter what i've
tried, however, i've been unable to to reproduce this (which my
chart reflects).  also, i'm not perfectly clear on what tests
are done to determine whether or not a shell is a login shell
and/or an interactive one.  i've got those tests that i've been
able to confirm empirically listed in the footnotes on my chart,
but i'm sure that there are others.  at the very least, the man
pages state that INTERACTIVE can be set to a different value,
whereas whenever i try to do so, i get an error back; similarly,
the tests given in the STARTUP FILES section of the manpage
for a login shell (-l or -zsh) aren't true for any of my login
shells, but they are still recognized as such.  so which are
the tests that i'm missing?

	-- sweth.

-- 
Sweth Chandramouli
IS Coordinator, The George Washington University
<sweth@gwu.edu> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html">*</a>

[-- Attachment #2: zshinits --]
[-- Type: text/plain, Size: 3890 bytes --]


ZSH initialization file load sequence:

                        |
                  {/etc/zshenv}
                        |
                        |
                        | (is NO_RCS set?[1])
                        |
                        |
           [yes]        |     [no]
      ----------------------------------
      |                                |
      |                                |
      |                        {$ZDOTDIR/.zshenv}
      |                                |
      |                                | (is this a login shell?[2])
      |                                |
      |                         [yes]  |  [no]
      |                 -------------------------------
      |                 |                             |
      |          {/etc/zprofile}                      |
      |                 |                             | (is this shell
      |        {$ZDOTDIR/.zprofile}                   | interactive?[3])
      |                 |                             |
      |                 |                      [yes]  |  [no]
      |                 |                    -------------------
      |                 |                    |                 |
      |           {/etc/zshrc}         {/etc/zshrc}            |
      |                 |                    |                 | 
      |         {$ZDOTDIR/.zshrc}    {$ZDOTDIR/.zshrc}         |
      |                 |                    |                 |
      |                 |                    |                 |
      |           {/etc/zlogin}              |                 |         
      |                 |                    |                 |        
      |         {$ZDOTDIR/.zlogin}           |                 |
      |                 |                    |                 |
      |                 |                    |                 |
   **************************************************************** 
   *                             SHELL                            *
   **************************************************************** 
      |                 |                    |                 |
      |                 | (is NO_RCS         |                 |
      |                 | set?[1])           |                 |
      |                 |                    |                 |
      |          [yes]  |  [no]              |                 |
      |        -------------------           |                 |  
      |        |                 |           |                 |
      |        |         {$ZDOTDIR/.zlogout} |                 |
      |        |                 |           |                 |
      |        |           {/etc/zlogout}    |                 |
      |        |                 |           |                 |
      x        x                 x           x                 x

Tests are matched as follows, in increasing order of precedence;
`unsetopt OPTION' is equivalent to `setopt NO_OPTION' and `unsetopt
NO_OPTION' is equivalent to `setopt OPTION' in terms of precedence. 
For example, zsh -f with `unsetopt NO_RCS' in /etc/zshenv will source
/etc/zshenv, $ZDOTDIR/.zshenv, /etc/zshrc, and $ZDOTDIR/.zshrc.

[1]   DEFAULT                                   => [no]
      `setopt NO_RCS' called before test        => [yes]
      `-f' flag present on shell invocation     => [yes]
      `setopt RCS' called before test           => [no]
      
[2]   DEFAULT                                   => [no]
      first character of argument zero (name 
         by which zsh is invoked) is `-'        => [yes]
      `-l' flag present on shell invocation     => [yes]
      
[3]   DEFAULT                                   => [no] 
      `-i' flag present on shell invocation     => [yes]
      standard input is a tty and commands 
         are being read from standard input     => [yes]
         

             reply	other threads:[~1998-08-09 20:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-09 19:08 Sweth Chandramouli [this message]
1998-08-09 22:04 ` Bart Schaefer
1998-08-10  1:02   ` Sweth Chandramouli
1998-08-10  3:51     ` Bart Schaefer
1998-08-15 17:24       ` Bart Schaefer
1998-08-10  9:13     ` Zefram

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=19980809150805.47993@astaroth.nit.gwu.edu \
    --to=sweth@astaroth.nit.gwu.edu \
    --cc=zsh-users@math.gatech.edu \
    /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).