Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Mar 2000 18:02:14 -0800 (PST)
From:      Doug Barton <Doug@gorean.org>
To:        Chris Costello <chris@calldei.com>
Cc:        Christian Weisgerber <naddy@mips.rhein-neckar.de>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Proposed new Bourne shell init files
Message-ID:  <Pine.BSF.4.21.0003311633350.73555-100000@dt051n0b.san.rr.com>
In-Reply-To: <20000331165457.A2556@holly.calldei.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 31 Mar 2000, Chris Costello wrote:

> On Friday, March 31, 2000, Doug Barton wrote:
> > 	In my mind there is a difference between items that are
> > freebsd-exclusive (like set -o and alias) and items that we have unique
> > implementations of, like export. The latter are available on other
> > platforms, and therefore, IMO we should follow the more generally accepted
> > format. Extending that argument to either not take advantage of features
> > unique to FreeBSD (silly and wasteful) or to doing everything FreeBSD'ish
> > just because we can (teaches a bad lesson) goes too far in either
> > direction for my taste. 
> 
>    ``set -o'', ``alias'', and ``export'' are all portable.  A few
> options for ``set -o'' may not be, but otherwise they are.  Where
> did you get the idea that the first two were FreeBSD-exclusive?

	I guess that's not the best term to use, so let me try and
rephrase my argument. All Bourne shells and derivatives have an export
command. On all Bourne shells and derivatives, you _can_ do:

var=foo
export var

It is not true however, that on all Bourne shells and derivatives that you
can do:

export var=foo

A simple example is Sun's Bourne shell implementation, in which there is
no set -o, there is no emacs mode, and there is no alias ability. There
is, however, an export command. Other SysV systems that follow a more
strict line of descent from the original Bourne shell are similarly
limited. 

	So to restate my point, in hopefully a more clear fashion, for
those commands like export which are universal across all Bourne shells
(and derivatives); my feeling is that we should use the syntax that will
work across all platforms. For those commands that are found in the
POSIX-like shells, I agree that using those commands is a good idea (even
though they are not 100% portable) and using the most convenient, and/or
the most obvious syntax is a good idea. 

	I realize that this may seem contradictory, but my feeling is that
if we are going to offer these files as the example implementation that
the example they set should be a good one. At the same time, if the
majority thinks that using 'export var=foo' is the best way to go, I'll
live with it. Either way, I would like to see _something_ done. This is an
area that has suffered from neglect for a long time. 

Doug
-- 
    "So, the cows were part of a dream that dreamed itself into
existence? Is that possible?" asked the student incredulously.
    The master simply replied, "Mu."





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0003311633350.73555-100000>