From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 12 03:11:26 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A83ED16A4D0 for ; Fri, 12 Nov 2004 03:11:26 +0000 (GMT) Received: from av8-1-sn2.hy.skanova.net (av8-1-sn2.hy.skanova.net [81.228.8.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 698C043D2D for ; Fri, 12 Nov 2004 03:11:25 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: by av8-1-sn2.hy.skanova.net (Postfix, from userid 502) id 2D27737E43; Fri, 12 Nov 2004 04:11:10 +0100 (CET) Received: from smtp2-2-sn2.hy.skanova.net (smtp2-2-sn2.hy.skanova.net [81.228.8.178]) by av8-1-sn2.hy.skanova.net (Postfix) with ESMTP id 1E6FB37E42 for ; Fri, 12 Nov 2004 04:11:10 +0100 (CET) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp2-2-sn2.hy.skanova.net (Postfix) with SMTP id D0B5537E42 for ; Fri, 12 Nov 2004 04:11:23 +0100 (CET) Received: (qmail 87139 invoked by uid 1001); 12 Nov 2004 03:11:22 -0000 Date: Fri, 12 Nov 2004 04:11:22 +0100 From: Erik Trulsson To: Avleen Vig Message-ID: <20041112031122.GA87071@falcon.midgard.homeip.net> Mail-Followup-To: Avleen Vig , Kevin Lyons , freebsd-hackers@freebsd.org References: <41940880.7070409@corserv.com> <20041112023023.GG19417@silverwraith.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041112023023.GG19417@silverwraith.com> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org cc: Kevin Lyons Subject: Re: tcsh fix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 03:11:26 -0000 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. -- Erik Trulsson ertr1013@student.uu.se