From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 735 invoked from network); 9 Aug 1998 20:03:02 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (7795@203.24.36.3) by ns1.primenet.com.au with SMTP; 9 Aug 1998 20:03:02 -0000 Received: (qmail 4765 invoked from network); 9 Aug 1998 19:12:28 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns2.primenet.com.au with SMTP; 9 Aug 1998 19:12:28 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id PAA01251; Sun, 9 Aug 1998 15:03:33 -0400 (EDT) Resent-Date: Sun, 9 Aug 1998 15:03:24 -0400 (EDT) Message-ID: <19980809150805.47993@astaroth.nit.gwu.edu> Date: Sun, 9 Aug 1998 15:08:05 -0400 From: Sweth Chandramouli To: ZSH Users Subject: init files Mail-Followup-To: ZSH Users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=bg08WKrSYDhXBjb5 X-Mailer: Mutt 0.89 Resent-Message-ID: <"5rTEg3.0.3J.x9Vpr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1713 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii 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 / (202) 994 - 8521 (V) / (202) 994 - 0458 (F) * --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=zshinits 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] --bg08WKrSYDhXBjb5--