tcsh fix

David O'Brien obrien at freebsd.org
Fri Nov 12 10:47:21 PST 2004


On Thu, Nov 11, 2004 at 09:55:43PM -0800, Avleen Vig wrote:
> On Fri, Nov 12, 2004 at 04:11:22AM +0100, Erik Trulsson wrote:
> > 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.
> 
> I strongly disagree. csh and sh should be 'pure' versions. That is to
> say, no matter what shell is actually being called as sh or csh, it
> should provide a 100% compatible version, no differences, no "upgrades".
> This is to provide compatibility whn working with multiple versions of
> Unix.

What is a pure 'csh'??  Please answer in detail.  Have you ever looked at
the source code for 4.3BSD 'csh'?  What about 'tcsh' source code?  Hint,
Christos Zoulas had at CSRG login and was maintaining and enhancing BSD
'csh'.  The 4.4BSD 'csh' was Zoulas's work.  'tcsh' is simply the
continued evolution of BSD 'csh'.

So do you want the original Bill Joy 'csh' from 3BSD??
Do you want the 'csh' that originally appeared in System 3 (or was it
V)??  Do you wan the 4.4BSD-Lite2 'csh' (ie, the last from CSRG)??
THERE IS NO STANDARD 'csh'.  POSIX doesn't even try to standardize it.

'csh' is an interactive shell, not a programming language.  Anyone trying
to write "portable" scripts in 'csh' should know why "Csh Programming
Considered Harmful" http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/


> I write many scripts in sh on Solaris, and find they just don't work on
> Linux because /bin/sh on Linux is really /bin/bash and is not bacwards
> compatible. I HATE this.

This is a totally different story.  There is a POSIX 'sh' standard, and
bash "leaks" extensions even when exec'ed as /bin/sh.


> > 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.)
> 
> Then we should follow current standards. Not pretend one shell is
> another!

Again, show me the standard addressing 'csh'.

-- 
-- David  (obrien at FreeBSD.org)


More information about the freebsd-hackers mailing list