Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh startup files
- X-seq: zsh-users 2282
- From: Stefan Monnier <monnier+lists/zsh/users/news/@tequila.cs.yale.edu>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: zsh startup files
- Date: 02 Apr 1999 08:12:59 -0500
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <9903251002.AA18225@xxxxxxxxxxxxxxxxx> <199903251055.LAA02436@xxxxxxxxxxxxxxxxxxxxx> <9903251117.AA09841@xxxxxxxxxxxxxxx> <9903251122.AA14741@xxxxxxxxxxxxxxxxx> <5l1zidiw46.fsf@xxxxxxxxxxxxxxxxxxx> <9903251400.AA54287@xxxxxxxxxxxxxxxxx> <5lyaklgy2w.fsf@xxxxxxxxxxxxxxxxxxx> <990327170423.ZM3271@xxxxxxxxxxxxxxxxxxxxxxx> <5logldgt3m.fsf@xxxxxxxxxxxxxxxxxxx> <990328175751.ZM8402@xxxxxxxxxxxxxxxxxxxxxxx> <19990328231428.A11812@xxxxxxxxxxxxxxxxxxxx> <5l90cmijvs.fsf@xxxxxxxxxxxxxxxxxxx> <19990324181547.A4700@xxxxxxxxxxxxxxxxxxxx> <5l7ls6iee4.fsf@xxxxxxxxxxxxxxxxxxx> <199903250220.VAA12122@xxxxxxxxxxxxxxxxxxxx> <19990325005332.B5194@xxxxxxxxxxxxxxxxxxxx> <9903250903.AA30753@xxxxxxxxxxxxxxxxx> <5ln20wgz57.fsf@xxxxxxxxxxxxxxxxxxx> <002501be79f0$86c54620$21c9ca95@xxxxxxxxxxxxxxx> <990330231453.ZM22023@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: monnier@xxxxxxxxxxxxxxxxxxx
>>>>> "Bart" == Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
> If you want an example of an even more convoluted initialization system
> that even more people use even more heavily than zsh, I need only point
> you to emacs.
I beg to disagree. Emacs's initialization is quite a bit simpler:
site-lisp/site-start.el ~/.emacs site-lisp/default.el
three simple steps where the last one can be disabled in either
of the first two.
> Sure. One, I set up the $LESS environment in zshrc, with z$[LINES-2] (set
> scroll height to two less than $LINES). Two, I used to have a multi-line
> $PS1, which I also set in zshrc, that depended on $COLUMNS, and that was
> not used at all when the terminal was "emacs" or "dumb". Three, I played
> for a while with different .exrc files for fast and slow connections; I
> set up $EXINIT based on the terminal type (yes, that's what $BAUD is for,
> but it was wrong for other reasons, and passing extra data through rlogin
> by stuffing it into $TERM and then parsing it out again is a time-honored
> hack). All these go in zshrc because they're useless to non-interactive
> shells, but sometimes necessary even in non-login ones (think "su" if
> nothing else).
These sound like ad-hoc hacks that more or less work in some specific cases.
Very far from the kind of things you'd want to put in /etc/zshrc.
> The interleaving of init files let me get away with that last one, because
> I could demangle $TERM in my .zshenv before /etc/zprofile ran. A system
The $TERM mangling is an interesting case. I'd tend to say that if
a /etc/zprofile or /etc/zshenv doesn't work with such a thing, it's broken.
It might work suboptimally, tho.
> Of course at this point (cf. the "exec" trick) I'm more likely to want to
> bypass the system files entirely, but that wasn't always the case, and
> sometimes isn't worth bothering with (I was just at a consulting job
> where the /etc/z* files did extensive environment setup for a collection
> of homegrown custom build tools; it would have been silly to try to redo
> it or reorder it).
So you agree in a sense: this fancy ordering is sometimes useful,
but when it is, other alternatives would work as well.
> Back when I was at OGI, the login banner had to announce that any user
> whose .login was found _not_ to contain a certain set of commands, would
> lose their access to the system.
I'm all for a /etc/zshenv or maybe even more init files (as a sysadmin
I really like to setup some envvars in there), but that has no relation to
whether these should be sourced in such an interleaved manner.
Stefan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author