zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: pws-20
Date: Tue, 01 Jun 1999 09:36:04 +0200	[thread overview]
Message-ID: <9906010736.AA12905@ibmth.df.unipi.it> (raw)
In-Reply-To: ""Bart Schaefer""'s message of "Mon, 31 May 1999 19:03:06 DFT." <990531190306.ZM5775@candle.brasslantern.com>

"Bart Schaefer" wrote:
> Peter seems to have completely forgotten to mention that a new scheme for
> /etc/z* files is in pws-20 ... but it doesn't appear to be the scheme that
> he said (in 6380) that he was going to implement.  It's "alternative #2"
> with the GLOBAL_RCS option replacing GLOBAL_RCS_FIRST.

Sorry, I was playing around looking at what to implement, and this was the
last attempt I did.  I then forgot it was still in the source when I came
back and produced pws-20, so this is a mistake.  Here's a patch against how
it appears in pws-20, putting it the way we decided; this will fail against
all previous versions.  Seems to me it's pretty hard to find the default
option settings in the manual, but I defied convention by mentioning them
here.

One subtlety I hadn't noticed:  unsetting rcs (or setting norcs) causes the
history file not to be saved.  This has always been the case, but it's
something else to think about if you start playing around with rcs in your
own initialisation files, so I noted it in the manual entry.

--- Doc/Zsh/files.yo.rcs2	Tue Jun  1 09:20:31 1999
+++ Doc/Zsh/files.yo	Tue Jun  1 09:24:21 1999
@@ -8,13 +8,12 @@
 pindex(NO_RCS, use of)
 pindex(NO_GLOBAL_RCS, use of)
 Commands are first read from tt(/etc/zshenv); this cannot be overridden.
-If the tt(RCS) option is unset, no further files are read; changing this
-option after this point has no effect on initialization files, but may
-affect behaviour on logout.  Subsequent behaviour is also modified by the
-option tt(GLOBAL_RCS).  If it is unset at any point during initialisation,
-later files in the tt(/etc) directory will not be read.  It is also
-possible for a file in tt($ZDOTDIR) to re-enable tt(GLOBAL_RCS). Both
-tt(RCS) and tt(GLOBAL_RCS) are set by default.
+Subsequent behaviour is modified by the tt(RCS) and
+tt(GLOBAL_RCS) options; the former affects all startup files, while the
+second only affects those in the tt(/etc) directory.  If one of the options
+is unset at any point, the corresponding startup file(s) will not be read.
+It is also possible for a file in tt($ZDOTDIR) to re-enable
+tt(GLOBAL_RCS). Both tt(RCS) and tt(GLOBAL_RCS) are set by default.
 
 Commands are then read from tt($ZDOTDIR/.zshenv).
 pindex(LOGIN, use of)
@@ -31,6 +30,9 @@
 end-of-file from the terminal.  However, if the shell terminates due
 to tt(exec)'ing another process, the logout files are not read.
 These are also affected by the tt(RCS) and tt(GLOBAL_RCS) options.
+Note also that the tt(RCS) option affects the saving of history files,
+i.e. if tt(RCS) is unset when the shell exits, no history file will be
+saved.
 
 If tt(ZDOTDIR) is unset, tt(HOME) is used instead.
 Those files listed above as being in tt(/etc) may be in another
--- Src/init.c.rcs2	Tue Jun  1 09:17:29 1999
+++ Src/init.c	Tue Jun  1 09:18:57 1999
@@ -758,33 +758,31 @@
 #ifdef GLOBAL_ZSHENV
 	source(GLOBAL_ZSHENV);
 #endif
-	if (isset(RCS)) {
-	    if (unset(PRIVILEGED))
-		sourcehome(".zshenv");
-	    if (islogin) {
+	if (isset(RCS) && unset(PRIVILEGED))
+	    sourcehome(".zshenv");
+	if (islogin) {
 #ifdef GLOBAL_ZPROFILE
-		if (isset(GLOBALRCS))
+	    if (isset(RCS) && isset(GLOBALRCS))
 		    source(GLOBAL_ZPROFILE);
 #endif
-		if (unset(PRIVILEGED))
-		    sourcehome(".zprofile");
-	    }
-	    if (interact) {
+	    if (isset(RCS) && unset(PRIVILEGED))
+		sourcehome(".zprofile");
+	}
+	if (interact) {
 #ifdef GLOBAL_ZSHRC
-		if (isset(GLOBALRCS))
-		    source(GLOBAL_ZSHRC);
+	    if (isset(RCS) && isset(GLOBALRCS))
+		source(GLOBAL_ZSHRC);
 #endif
-		if (unset(PRIVILEGED))
-		    sourcehome(".zshrc");
-	    }
-	    if (islogin) {
+	    if (isset(RCS) && unset(PRIVILEGED))
+		sourcehome(".zshrc");
+	}
+	if (islogin) {
 #ifdef GLOBAL_ZLOGIN
-		if (isset(GLOBALRCS))
-		    source(GLOBAL_ZLOGIN);
+	    if (isset(RCS) && isset(GLOBALRCS))
+		source(GLOBAL_ZLOGIN);
 #endif
-		if (unset(PRIVILEGED))
-		    sourcehome(".zlogin");
-	    }
+	    if (isset(RCS) && unset(PRIVILEGED))
+		sourcehome(".zlogin");
 	}
     }
     noerrexit = 0;

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


      reply	other threads:[~1999-06-01  8:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-31 15:15 pws-20 Peter Stephenson
1999-05-31 19:03 ` pws-20 Bart Schaefer
1999-06-01  7:36   ` Peter Stephenson [this message]

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=9906010736.AA12905@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).