From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 18 22:16:31 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0D41106566C for ; Wed, 18 Jan 2012 22:16:31 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 7A1778FC0C for ; Wed, 18 Jan 2012 22:16:31 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id CD2AE35B12F; Wed, 18 Jan 2012 23:16:30 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id A974528468; Wed, 18 Jan 2012 23:16:30 +0100 (CET) Date: Wed, 18 Jan 2012 23:16:30 +0100 From: Jilles Tjoelker To: Matthew Story Message-ID: <20120118221630.GA97471@stack.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: intent of tab-completion in /bin/sh in 9.0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2012 22:16:32 -0000 On Wed, Jan 18, 2012 at 11:00:44AM -0500, Matthew Story wrote: > Just noticed that tab-completion in /bin/sh has been added in 9.0 > (verified that it is not there in 8.0, dunno if it's there in 8.2, > could probably go digging to figure it out). In addition to the > command history via : (which is present in 8.0) FreeBSD sh > is now actually a pretty usable interactive shell. I also noticed > that the following bit has been removed from the sh(1): > This version has many features which make it appear similar in some > respects to the Korn shell, but it is not a Korn shell clone like pdksh. That sentence is an implicit comparison to the Bourne shell. When it was written, many other Un*x variants had a version of the Bourne shell as /bin/sh, and it was not taken for granted to have things like $(...), $((...)) and ${...#...} in a /bin/sh. Nowadays, this is often taken for granted; the last OS to have a Bourne shell as /bin/sh is probably Solaris 10 (11 has ksh93). On the contrary, our /bin/sh is minimalistic compared to many other shells used in that role, like bash, pdksh, mksh and ksh93. It (the 9.0 version) has only slightly more features than dash or NetBSD's sh, and dash has instead some other features. > Just wondering if the general direction here is attempting to provide a > minimal POSIX shell, that is useful enough interactively to become the > default root shell (supplanting csh)? Or if there is just a general trend > towards adopting more of the ksh feature-set. POSIX itself has gradually adopted ksh features, so seeing more of them in future is not unlikely. Most of the new language features in 9.0 are either from POSIX.1-2008 or on the roadmap for a new version of POSIX (in collaboration with other shell authors). Adding other ksh features is not very likely. It is certainly possible to use /bin/sh as root's shell, but the distributed master.passwd entry will probably continue to use /bin/csh for a long time. Some plans for sh in 10.0 are in this mailing list post: http://lists.freebsd.org/pipermail/freebsd-arch/2011-December/011976.html -- Jilles Tjoelker