zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-workers@sunsite.dk
Cc: Mikael Magnusson <mikachu@gmail.com>
Subject: Re: environment settings
Date: Wed, 18 Jun 2008 12:38:08 +0200	[thread overview]
Message-ID: <20080618103808.GB10734@prunille.vinc17.org> (raw)
In-Reply-To: <20080617203229.GU5016@sc.homeunix.net>

On 2008-06-17 21:32:29 +0100, Stephane Chazelas wrote:
> And while we're at it, it can also do an "unfunction echo" and
> "unalias echo" because someone might have redefined "echo" in
> the ~/.zshenv to behave POSIXly.

If the script uses zsh features of echo, yes. Now, in practice, if
a user writes a zsh script for himself, he knows what he has put in
his .zshenv, so that he should know what he needs to undefine in his
scripts (most often, there's nothing to do). Those who want to write
portable scripts shouldn't write zsh scripts anyway (BTW, even Debian
goes back from bash to POSIX sh). So, in short, there's no practical
problem.

> Let's be serious please. Or let's do as for csh, where one must
> add the -f to the shebang line to avoid this kind of problem.

Well, concerning csh, the -f is necessary just because users do nasty
things in their .cshrc (but csh is also at fault by not have something
like .cshenv where users can put *minimal* things). Anyway csh is
incompatible with everything else, has bugs and is no longer standard.
One should not write csh scripts any longer.

> ~/.zshenv can be a useful tool but it must be used with care. 

Yes, it must be used with care, but this is also true for other
config files.

Also, bash is really annoying by not sourcing some rc file:

brocoli:~> which tps
/home/vlefevre/bin/tps

(I install my own utilities, written by myself, in my home directory.)

brocoli:~> ssh -t doublejack tps
Connected to doublejack (from 140.77.14.28)
DISPLAY: localhost:11.0
bash: tps: command not found
Connection to doublejack closed.

Fortunately this has been fixed in Debian.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


  reply	other threads:[~2008-06-18 10:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080616074651.GB26165@marcus>
     [not found] ` <20080616080556.GA5091@sc.homeunix.net>
     [not found]   ` <20080616123045.GC26165@marcus>
     [not found]     ` <20080616124450.GC5091@sc.homeunix.net>
2008-06-17  8:33       ` Jörg Sommer
2008-06-17  9:39         ` Stephane Chazelas
2008-06-17 10:41           ` Vincent Lefevre
2008-06-17 12:58             ` Stephane Chazelas
2008-06-17 13:11               ` Vincent Lefevre
2008-06-17 13:26                 ` Stephane Chazelas
2008-06-17 13:28                   ` Mikael Magnusson
2008-06-17 14:25                     ` Stephane Chazelas
2008-06-17 15:54                       ` Vincent Lefevre
2008-06-17 16:00                         ` Stephane Chazelas
2008-06-17 19:50                           ` Vincent Lefevre
2008-06-17 20:32                             ` Stephane Chazelas
2008-06-18 10:38                               ` Vincent Lefevre [this message]
2008-06-18 11:52                                 ` Stephane Chazelas
2008-06-18 17:11                                   ` Bart Schaefer
2008-06-17 14:55                     ` Vincent Lefevre
2008-06-17 14:45                   ` Vincent Lefevre
2008-06-18  8:49           ` Jörg Sommer
2008-06-18  9:33             ` Stephane Chazelas
2008-06-21  6:26         ` Wayne Davison
2008-06-21 11:36           ` Vincent Lefevre
2008-06-21 12:30             ` Stephane Chazelas
2008-06-22  8:41               ` Vincent Lefevre
2008-06-23 15:24                 ` Stephane Chazelas
2008-06-23 16:16                   ` Vincent Lefevre
2008-06-23 16:20                   ` Bart Schaefer
2008-06-23 16:29                     ` Stephane Chazelas

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=20080618103808.GB10734@prunille.vinc17.org \
    --to=vincent@vinc17.org \
    --cc=mikachu@gmail.com \
    --cc=zsh-workers@sunsite.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).