Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2000 14:21:36 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "David O'Brien" <obrien@freebsd.org>
Cc:        arch@freebsd.org
Subject:   Re: Import of tcsh into src/contrib/, replacing src/usr.bin/csh
Message-ID:  <200004062121.OAA90627@apollo.backplane.com>
References:   <20000406134916.A23265@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

:I'm going to be importing tcsh into src/contrib/ and replacing /bin/csh
:with tcsh.  Tcsh started life as the CSRG BSD csh sources, is maintained
:by a BSD developer, and is fully under the BSD license.  I can find zero
:reason to keep our limited UI /bin/csh.  I've seen *MANY* people get
:highly irritated at root's shell being one of poor UI.  Of the [t]csh
:users I know, only about 10% use csh over tcsh and that is only because
:csh is in the base system.  Those people would not even notice the extra
:tcsh features.
:
:Before someone asks here are the sizes:
:
:    379900  /bin/csh*
:    561536  /bin/sh*
:    336852  tcsh*
:    735152  tcsh.static*
:
:Yes I know tcsh is larger than csh, but does that *really* matter?  Only
:the "operator" user in PicoBSD uses csh, and that could easily be changed
:to `sh'.  I can't find any CSH scripts that are part of PicoBSD, so I
:don't see where csh is a dependency for PicoBSD.
:
:-- 
:-- David    (obrien@NUXI.com)

    I don't think we can replace /bin/csh with tcsh, for compatibility
    reasons.  Thousands upon thousands of scripts use csh and the risk is just
    too great that we might break some of them.  Remember /bin/sh vs
    /bin/bash?  I'll admit /bin/csh vs /bin/tcsh is less of a problem, but
    it's still a problem.

    I think we *CAN* change the default shell to tcsh, and make /bin/tcsh
    official (rather then having to use /usr/local/bin/tcsh).  I've used 
    tcsh for years, even for shell scripts (because it doesn't have internal
    variable size limitations for things like foreach loops containing
    backticked command output), and I think making it the default is
    an excellent idea.

    I would also propose that the default csh.cshrc (which tcsh sources)
    still be used for both tcsh and csh since it's so trivial to test which
    one is sourcing the file.  I do *NOT* recommend creating a separate
    .tcshrc. 

    And I would also propose that we turn command-line partial-history-
    completion on by default.  Once you start using it, you will never go
    back (Amiga, anyone?).  Finally, I recommend that we map ^W to 
    word-erase (for tcsh).

for "/etc/csh.cshrc":

    if ( $shell == "/bin/tcsh" || $shell == "/usr/local/bin/tcsh" ) then
        set prompt = "%m:%/%# "
        set symlinks = expand
        bindkey "^W" backward-delete-word
        bindkey -k up history-search-backward
        bindkey -k down history-search-forward
    endif

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>




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




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