From owner-freebsd-arch@freebsd.org Fri Jan 25 21:39:51 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CEB314C3F4D; Fri, 25 Jan 2019 21:39:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1591874807; Fri, 25 Jan 2019 21:39:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id B8408B0CF; Fri, 25 Jan 2019 21:39:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from [192.168.0.17] (207.141.6.93.rev.sfr.net [93.6.141.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ivaldir.etoilebsd.net (Postfix) with ESMTPSA id 52289B48D9; Fri, 25 Jan 2019 22:39:49 +0100 (CET) Date: Fri, 25 Jan 2019 22:39:47 +0100 User-Agent: K-9 Mail for Android In-Reply-To: <201901252129.x0PLTQAn008365@slippy.cwsent.com> References: <201901252129.x0PLTQAn008365@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Importing mksh in base To: Cy Schubert CC: freebsd-arch@freebsd.org,arch@freebsd.org From: Baptiste Daroussin Message-ID: <42367007-C290-42C9-9F44-2A8F48665E7C@FreeBSD.org> X-Rspamd-Queue-Id: 1591874807 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983,0] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 21:39:51 -0000 Le 25 janvier 2019 22:29:26 GMT+01:00, Cy Schubert a =C3=A9crit : >In message <20190125210346=2Exzvrvuvr4rj3guov@ivaldir=2Enet>, Baptiste=20 >Daroussin wr >ites: >>=20 >> >> --l7d7rf235ll3lmav >> Content-Type: text/plain; charset=3Diso-8859-1 >> Content-Disposition: inline >> Content-Transfer-Encoding: quoted-printable >> >> On Fri, Jan 25, 2019 at 11:24:26AM -0800, Cy Schubert wrote: >> > First time I've tried replying inline on this newer phone=2E Bear >with me a=3D >> s this reply may not look like I intend it to=2E >> >=3D20 >> > On January 25, 2019 11:07:55 AM PST, Baptiste Daroussin >> > wrote: >> > > >> > > >> > >Le 25 janvier 2019 18:12:58 GMT+01:00, Cy Schubert >> > > a =3DE9crit : >> > >>On January 25, 2019 8:57:51 AM PST, Baptiste Daroussin >> > >> wrote: >> > >>>Hi everyone, >> > >>> >> > >>>I would like to import mksh in base, >https://www=2Emirbsd=2Eorg/mksh=2Ehtm >> > >>>And make it the default root shell (not necessary in one step) >> > >>> >> > >>>Why: >> > >>>1/ it is tiny 400k (in the packaged version) all other shells >fitting >> > >>>the >> > >>>expectation are bigger >> > >>>2/ it's default frontend in interactive mode is very close to >what >> > >>most >> > >>>people >> > >>>are used to with bash and shells as default root shell on other >BSD >> > >>and >> > >>>most >> > >>>linuxes >> > >>>3/ from my narrow window csh as a default root shell is one of >the >> > >>>major >> > >>>complaint (usually the first thing a user get faced to) from new >> > >>comers >> > >>>and >> > >>>also for some long timers who are reinstalling a machine and >have not >> > >>>yet >> > >>>installed/configured a bourne compatible shell >> > >>> >> > >>>What this proposal is _NOT_ about: >> > >>>1/ the removal of tcsh from base >> > >>>2/ any kid of denial of the quality and interest or features of >csh >> > >>> >> > >>>What do you think? >> > >>>Best regards, >> > >>>Bapt >> > >> >> > >>Why not ksh93 instead? It is the original and authoritative Korn >> > >shell=2E >> > >>EPL is compatible with the BSD license=2E Personally, I've been >toying >> > >>with the idea of importing ksh93 for a while now=2E >> > >> >> > > >> > >The reason I chose mksh is because it is heavily maintained and >from >> > >the testing I have done it was the "nicer" interface >> > > >> >=3D20 >> > Ksh93 is also heavily maintained=2E Look at their github activity=2E >My ksh9=3D >> 3-devel port has been tracking updates (I consider important)=2E >> >> I gave a chance to ksh93-devel, my first impression are the >following, as an >> interactive shell, it looks nicer than I remembered (still prefer >mksh thou=3D >> gh) > >Interactively ksh93's command completion listing looks unconventional=20 >but it functions the same=2E > >However programmatically it's the standard=2E Large commercial vendors,= =20 >like Oracle, still require ksh for its array handling among other=20 >things=2E > >> the completion looks "unexpected" but interesting I bet that can >probably be >> tuned (having a numbered list with fullpath of application I can do >complet=3D >> ion >> on is not what I did expect) > >Completion is different=2E > >> >> In emacs mode, the history search does not look great, (not it does >not look >> great as well in mksh, but less worse :)) >> >> In vi mode both seem to behave the same >> >> Manpages in both sides looks pretty complete >> >> mksh only depends on libc while ksh93 depends on libc, libexecinfo >and libm >> >> on amd64: >> ksh93 is 1=2E2M >> mksh is 331k > >It has that advantage=2E For embedded this is an advantage=2E However if= =20 >embedded is using ksh as a scripting language mksh and pdksh aren't=20 >100% compatible=2E Just so we know, It's interactive only and people=20 >would be well advised to install the port if doing any serious shell=20 >scripting=2E > >I think the size difference doesn't make up for the differences in=20 >scripting capability=2E (Yes, you can do arrays in bash but the syntax is > >different=2E) It really depends on what we want here=2E A full featured= =20 >shell that can be used for ksh93 scripts or strictly as an interactive=20 >shell with incomplete support of the ksh88 standard=2E > >> >> Overall I still think mksh is a better choice there > >Though I still disagree, a knob to disable it, WITHOUT_MKSH, would be a > >must as those who symlink to /usr/bin/ksh or /bin/ksh would be=20 >affected=2E And, The goal of the import is not about providing a new scripting shell but an= interactive which closer to csh to what seems basic default expectation of= most (which still needs to be validated as such) I didn t intent to add it as /bin/ksh but as /bin/mksh Best regards Bapt