zsh-users
 help / color / mirror / code / Atom feed
From: Tim Writer <Tim.Writer@ftlsol.com>
To: TGAPE! <tgape@dal-tsa6-26.cyberramp.net>
Cc: zefram@tao.co.uk (Andrew Main),
	quinn@envy.ugcs.caltech.edu, zsh-users@math.gatech.edu
Subject: Re: ideas, questions, and bugs (?)
Date: 09 Oct 1997 13:57:52 -0400	[thread overview]
Message-ID: <m3d8lehl9b.fsf@snoopy.ftlsol.com> (raw)
In-Reply-To: TGAPE!'s message of Wed, 8 Oct 1997 20:11:56 +0000 (GMT)

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?
> >
> > Put them in zshenv, and export if appropriate.
> 
> 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
well in a networked environment, consider:

    rsh thathost xterm -display thishost:0.0

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.

> 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.

> (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?

-- 
Tim Writer                                              Tim.Writer@ftlsol.com
FTL Solutions Inc.
Toronto, Ontario, CANADA


  reply	other threads:[~1997-10-09 18:15 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 [this message]
1997-10-11  0:08       ` TGAPE!

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=m3d8lehl9b.fsf@snoopy.ftlsol.com \
    --to=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).