From: TGAPE! <tgape@cyberramp.net>
To: Tim.Writer@ftlsol.com (Tim Writer)
Cc: tgape@dal-tsa6-26.cyberramp.net, zefram@tao.co.uk,
quinn@envy.ugcs.caltech.edu, zsh-users@math.gatech.edu
Subject: Re: ideas, questions, and bugs (?)
Date: Sat, 11 Oct 1997 00:08:04 +0000 (GMT) [thread overview]
Message-ID: <199710110008.AAA00577@dal-tsa5-1.cyberramp.net> (raw)
In-Reply-To: <m3d8lehl9b.fsf@snoopy.ftlsol.com> from "Tim Writer" at Oct 9, 97 01:57:52 pm
Tim Writer wrote:
> TGAPE! <tgape@dal-tsa6-26.cyberramp.net> writes:
>
>>>> Also, is it better to stick vars in zlogin and export them so future
>>>> shells inherit them, or put things like PATH, MANPATH, HOSTNAME, etc. in
>>>> zshenv?
>>
>> Be sensible. EDITOR, HISTFILE, HISTSIZE, LESS, PAGER, VISUAL, and other
>> such environment variables shouldn't be in zshenv - they can only be
>> used in interactive shells. Of course, setting every environment
>
> Do you mean they belong in .zlogin? In my experience, this doesn't work very
No, .zshrc is for interactive shells, according to the manpage. I
haven't actually tested to make sure it's not run for scripts, but I
cannot recall having seen its contens when I've run a script -x.
Strangely, this removes almost all use for .profile...
> well in a networked environment, consider:
>
> rsh thathost xterm -display thishost:0.0
Consider 'rsh therehost elm' - game over, man, game over.
> The shell running inside xterm is interactive, but it's not a login shell, so
> it won't have EDITOR, HISTFILE, etc. which is probably not what you want. Of
> course, you can use "xterm -ls", but not everybody uses xterm and terminal
> emulators such as shelltool don't have a similar option.
Terminal emulators such as shelltool are broken, in many varied ways.
If you use shelltool, you might as well have a broken /etc/zshenv, let
alone one which is merely not obsessively optimized. Shoot, you might
as well go whole-hog and use vile as your text editor, or maybe ed.
I can't remember all the problems I've had using shelltool, but lately,
since we've gotten the new people, I seem to recall saying, "I never
figured out how to get around that problem in shelltool" a rather lot.
I'll stop here before some router decides that I *really* meant to send
this to alt.sysadmin.recovery, and redirects it for me. Sorry for
interrupting your discussion with this unscheduled rant.
>> variable I set takes less than a second; it doesn't hurt *that* much
>> unless you have a *lot* of shell scripts that read /etc/zshenv.
>
> I agree with this. In practice, I find it's easier to put all this stuff in
> /etc/zshenv or ~/.zshenv and leave ~/.zlogin for things that are *strictly*
> part of logging in, starting X for example.
Ugh. To each their own. (Though, admittedly, you're already thrice
damned for using SunOS...)
I maybe should point out that, while I once had a full /etc/zlogin,
pretty much everything which was once there has moved to either
~/.z/.zlogin, ~/.z/.zprofile, or /etc/zprofile...
>> (I do - my zshenv contains all of my setopts in it, and most zsh scripts
>> want them.)
>>
>> Question: would it be possible to avoid this whole problem by re-writing
>> /sbin/init as a zsh script? That way, it can export all of the variables,
>> and so you don't need to worry about cron-executed programs having a
>> different environment.
>
> What about environment variables set in ~/.zshenv? Why not just put "zsh -l"
> in your crontab?
Actually, my crontab doesn't appear to have any environment variable (or
shell variable for that matter) referenced in it at all. Something
*must* be wrong here. Ok, who am I, and where's the real Ed?
Ah. Found them; they were hidden away in a script called by a script.
But, the script set them before using them. I still want to know what
I did with the real Ed.
Ed
prev parent reply other threads:[~1997-10-11 18:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-08 7:11 Quinn Dunkan
1997-10-08 8:19 ` Peter Stephenson
1997-10-08 9:11 ` Andrew Main
1997-10-08 9:34 ` Andrew Main
1997-10-08 20:11 ` TGAPE!
1997-10-09 17:57 ` Tim Writer
1997-10-11 0:08 ` TGAPE! [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=199710110008.AAA00577@dal-tsa5-1.cyberramp.net \
--to=tgape@cyberramp.net \
--cc=Tim.Writer@ftlsol.com \
--cc=quinn@envy.ugcs.caltech.edu \
--cc=tgape@dal-tsa6-26.cyberramp.net \
--cc=zefram@tao.co.uk \
--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).