Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Nov 2004 04:11:22 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Avleen Vig <lists-freebsd@silverwraith.com>
Cc:        Kevin Lyons <klyons@corserv.com>
Subject:   Re: tcsh fix
Message-ID:  <20041112031122.GA87071@falcon.midgard.homeip.net>
In-Reply-To: <20041112023023.GG19417@silverwraith.com>
References:  <41940880.7070409@corserv.com> <20041112023023.GG19417@silverwraith.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 11, 2004 at 06:30:23PM -0800, Avleen Vig wrote:
> On Thu, Nov 11, 2004 at 06:49:04PM -0600, Kevin Lyons wrote:
> > I think the problem can still be fixed.  Simply put in /bin/tcsh and let 
> > /bin/csh be what it actually is, which is to say /bin/csh.  I realize 
> > that will add all of 300kB to the system. And there would also have to 
> > be an entry for tcsh in /etc/shells.  Should I send a patch?
> > 
> > Developers have a right to expect a certain basic level of functionality 
> > on a system.  When he calls fopen() he should get fopen, when he calls 
> > /bin/bash he should get /bin/bash not zsh nor sh nor ksh.

When /bin/bash is called he should get a message saying that there is
no such program, since bash has no business being installed under /bin.
(This for FreeBSD - other systems have other conventions.)

Personally I am of the opinion that csh (all versions) should be
removed completely from the base system and relegated entirely to the
ports system. Other than historical reasons there is not much point in
having it in the base system.
Other peoples opinions differ however, and last time the future of csh/tcsh
was discussed (in a *long* bikeshed-thread) the decision was that
/bin/csh should be upgraded to the latest version of tcsh.
If one is to have csh in the base system this was probably the right
decision.
(Originally csh was created to get a shell with better interactive
features the original Bourne shell and tcsh is much better for
interactive use than 'classic' csh - indeed a modern /bin/sh is better
than 'classic' csh.  For writing scripts the Bourne-derivatives is much
better than csh and it has long been strongly recommended that one
should not write scripts for csh. One cannot even assume that
all systems have csh installed - Posix doesn't require it but it does
require /bin/sh to be present.) 

> 
> I have to agree with Kevin's sentiments on principle.
> 'csh' should run pure csh, not anything else.

'csh' does run pure csh, and nothing else. The latest version of csh
which happens to be renamed to tcsh to be exact.  That this latest
version is not 100% compatible with earlier versions might be
unfortunate but very few software packages never break backwards
compatibility.


> 'sh' should be pure sh, not what Linux does and bastardize it as
> /bin/bash

There is no such thing as "pure sh".  It you believe otherwise please
tell us what you think such a shell would look like and exactly what
features should be in it.
(Hint: Current standards require /bin/sh to have several features that
were not available on early Unix versions.)

The only real problem with having bash as /bin/sh is that people tend
to write scripts using bash-specific features and forget that such
scripts are not portable to systems using a less powerful /bin/sh.

> 
> If someon wants a more powerful shell, they can install it themselves.

Keep in mind that FreeBSD's /bin/sh is a more powerful shell than was
available in, say, v7 Unix.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041112031122.GA87071>