From owner-freebsd-hackers@freebsd.org Fri Mar 11 10:58:20 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7B4AACC197 for ; Fri, 11 Mar 2016 10:58:20 +0000 (UTC) (envelope-from moxalt@riseup.net) Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B143519B9 for ; Fri, 11 Mar 2016 10:58:20 +0000 (UTC) (envelope-from moxalt@riseup.net) Received: from piha.riseup.net (unknown [10.0.1.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id A3B5D1A14B2 for ; Fri, 11 Mar 2016 10:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1457693516; bh=7ynyN8pYEvlbzZy30Shs5N6f8+z2SsMZoCFMjhUI5n0=; h=Date:From:To:Subject:In-Reply-To:References:From; b=kkS2h5t146SywdMb86uzc8Y7ipe8sdBmd6LpWsC4JTUJwkDalerbXZzbbmjvlieEG GnfNhPS3ghH9ldtkN23WEsL+BrzejEgNIT3Od2q0QnFvFg607ojKd/iWBXsLaOqvso F7SFG95+hi49bKIKzQeAwm1T3HsPimWZ0M5y6aqA= Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: moxalt) with ESMTPSA id CE1181C027A Date: Fri, 11 Mar 2016 13:50:14 +0300 From: Adam Wilson To: freebsd-hackers@freebsd.org Subject: Re: FreeBSD sh on Linux? Message-ID: <20160311135014.56c13258@riseup.net> In-Reply-To: <20160310201819.GA5821@stack.nl> References: <8EC0DC6F-FA0D-4B8D-AECE-F1F797EE4D56@dataix.net> <20160310201819.GA5821@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: clamav-milter 0.99 at mx1.riseup.net X-Virus-Status: Clean X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 10:58:20 -0000 On Thu, 10 Mar 2016 21:18:19 +0100 Jilles Tjoelker wrote: > On Wed, Mar 09, 2016 at 08:27:05PM +0700, C Bergstr=C3=B6m wrote: > > On Wed, Mar 9, 2016 at 8:13 PM, Jason Hellenthal > > wrote: >=20 > > > On Mar 9, 2016, at 02:06, Brendan Sechter > > > wrote: >=20 > > > > Is there any reason why FreeBSD sh can't be used on Linux? dash > > > > is not a suitable login shell and bash is GNU. >=20 > You'd need to do some work to make it compile. There is a package > called libbsd which should be helpful. >=20 > The filename completion in FreeBSD sh also uses a FreeBSD-local patch > to libedit. This will be problematic if you want to maintain a > package in a distribution. >=20 > > > It's just the ash(1) shell with a few modifications that's a > > > little more standard than most. Shouldn't be any reason why it > > > can't >=20 > There are quite a few bugfixes, features and performance improvements > that are in FreeBSD sh and not in most other ash variants, such as > UTF-8 support, $'...' to embed control characters and Unicode more > easily, simple command substitutions without fork() and vfork() use. > Therefore, I think the original question is reasonable, if the > request is for a scripting shell (including for system() and make). >=20 > > /* not meaning to be a troll */ >=20 > > If you're going down this route - there's also ksh93 from solaris, > > which may be easy to extract (or maybe has done so already.. not > > sure) in my experience it's that nice balance between bare minimum > > sh and bash. >=20 > ksh93 is in ports. Debian includes the 1993 version of ksh in stable. Not sure if that's the same thing- the package name is ksh, but it conforms to the specification from 1993 as opposed to the 1988 version.