zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-users@sunsite.auc.dk
Subject: Re: zsh startup files
Date: Thu, 25 Mar 1999 15:00:44 +0100	[thread overview]
Message-ID: <9903251400.AA54287@ibmth.df.unipi.it> (raw)
In-Reply-To: "Stefan Monnier"'s message of "25 Mar 1999 07:36:57 NFT." <5l1zidiw46.fsf@tequila.cs.yale.edu>

Stefan Monnier wrote:
> >>>>> "Peter" == Peter Stephenson <pws@ibmth.df.unipi.it> writes:
> > This makes things rather complicated; there's no fundamental difficulty,
> > but I'd prefer to keep it clean.  The idea is not that you're at war with
> > the sysadmin, who's supposed to make it easy for users to set their own
> > preferences.  But if this is popular enough...
> 
> No.

`No, this idea isn't popular', or `No, I am at war with the sysadmin who
doesn't make it easy'?

Various possibilities are

- set GLOBAL_RCS_FIRST by default in the next version; but whenever we do
something like that, something nasty happens.  True, it shouldn't hurt the
/etc/z* files which have to be able to run with no dot files in between,
but it could have some effect for dot files (can anyone produce an example?)

- make it available in the next version, and announce it may be set by
default in future, so that you should add `unsetopt GLOBAL_RCS_FIRST' to
/etc/zshenv if you really don't want it.

> Actually, now that I think about it, why do we even need all those /etc/z*
> files ?  It seems that all except for either /etc/zprofile or /etc/zshenv
> should be kept empty in all but really unusual circumstances (in which case
> you can still use zshenv for the same purpose).

Potentially, they may be useful, but I certainly agree they're overused and
often abused.  On this system here, we have /etc/zprofile, /etc/zshenv and
/etc/zshrc --- and they're almost identical.

> I guess I could live with just NO_GLOBAL_RCS that I would
> set in my .zshenv although it won't do me any good as a sysadmin.

(Do you mean GLOBAL_RCS_FIRST, or are you proposing a different option for
not running global scripts apart from /etc/zshenv at all?)  If it worked in
.zshenv, it would certainly be made to work in /etc/zshenv: the question
would be whether it should have an effect in .zshenv as well.

> Now, how can I simulate NO_GLOBAL_RCS (I don't want to wait for my
> sysadmins to install a newer zsh version) ?

Again, if you mean, `how do I get all my code to run after the global
scripts have finished', then I can't see any problem with the following,
but I haven't tried it out, so I may have missed something.  I've relied on
the fact that .zshrc is run for any interactive shell (option interactive
is set), and .zprofile and .zlogin for any login shell (option login set),
and that a login shell is always interactive.  That should answer your
other question.

1. Move .zshenv, .zprofile, .zshrc, .zlogin to .real_zshenv,
.real_zprofile, etc, etc.

2a. In .zshenv:

if [[ ! -o interactive ]]; then
  [[ -f ~/.real_zshenv ]] && source ~/.real_zshenv
fi

2b. Delete .zprofile

2c. In .zshrc:

if [[ ! -o login ]]; then
  [[ -f ~/.real_zshrc ]] && source ~/.real_zshrc
fi

2d. In .zlogin:

[[ -f ~/.real_zshenv ]] && source ~/.real_zshenv
[[ -f ~/.real_zprofile ]] && source ~/.real_zprofile
[[ -f ~/.real_zshrc ]] && source ~/.real_zshrc
[[ -f ~/.real_zlogin ]] && source ~/.real_zlogin

-- 
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-03-25 14:18 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-24 22:48 Stefan Monnier
1999-03-24 23:15 ` Sweth Chandramouli
1999-03-25  0:47   ` Stefan Monnier
1999-03-25  5:53     ` Sweth Chandramouli
1999-03-25 11:17       ` Doug Morris
1999-03-25  2:20   ` Jason Price
1999-03-25  9:03 ` Peter Stephenson
     [not found]   ` <9903251002.AA18225@ibmth.df.unipi.it>
1999-03-25 10:55     ` Wolfgang Hukriede
1999-03-25 11:22       ` Peter Stephenson
1999-03-25 12:36         ` Stefan Monnier
1999-03-25 14:00           ` Peter Stephenson [this message]
1999-03-25 19:37             ` Stefan Monnier
1999-03-28  1:04               ` Bart Schaefer
1999-03-28 22:14                 ` Stefan Monnier
1999-03-29  1:57                   ` Bart Schaefer
1999-03-29  4:14                     ` Sweth Chandramouli
1999-03-29 14:15                     ` Stefan Monnier
1999-03-29 14:29                       ` Andrej Borsenkow
1999-03-31  7:14                         ` Bart Schaefer
1999-03-31  7:49                           ` Bart Schaefer
1999-04-02 13:12                           ` Stefan Monnier
1999-04-02 17:13                             ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2006-03-14 17:38 zzapper
2006-03-14 19:50 ` Wayne Davison
2006-03-15  2:43   ` Bart Schaefer
2006-03-15 18:22     ` Phil Pennock
2006-03-16 19:29     ` Dominic Mitchell
1996-10-19 23:04 Zsh " Nate Johnston
1996-10-20 11:09 ` 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=9903251400.AA54287@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-users@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).