News for hackers. Stuff that matters.
Re:OpenBSD 7.0 by yabones on Thursday October 14, 2021 @10:53AM (#28865089)
Yes, absolutely true. The idea is that `ksh` is good enough, and the extra features of bash are extraneous or unnecessary, making it an add-on rather than a core feature.

It's an interesting idea, and while I feel bash is absolutely 'good enough' to be part of the base system, I wouldn't want zsh or fish part of my base system - so it's then a matter of opinion whose shell is bloat and whose is essential. So I respect their decision to not include bash in the base image - it's meant to be uncompromisingly lean and simple.

Re:OpenBSD 7.0 by chasil on Thursday October 14, 2021 @11:30AM (#28865677)
Another issue is size. This is what I see on CentOS:

    $ ls -l /bin/bash /bin/dash /bin/mksh
    -rwxr-xr-x. 1 root root 964536 Nov 22  2019 /bin/bash
    -rwxr-xr-x. 1 root root 113536 Nov  5  2018 /bin/dash
    -rwxr-xr-x. 1 root root 296192 Jan 27  2018 /bin/mksh
The Debian Almquist shell has nearly nothing beyond POSIX (I believe that local function variables are the only extension). This is the Ubuntu system shell, and it tolerates no bashisms. Alternate POSIX shell implementations in OCaml (and somewhat ADA) accuse Almquist of not using formal grammars and imply that dash is not a safe implementation.

https://www.irif.fr/_media/rencontres/pps2018/regis-gianas.p...

I would say that mksh implements 80% of bash functionality in much less space, and closely follows ksh88; mksh is also licensed such that Android uses it as /bin/sh.

Apple has switched from bash to zsh. I don't know the motivations for this, but preferences for shells wax and wane. BSD doesn't include bash (in base) more because of license than code quality.

POSIX seems to be all that we can agree on, but I do wish that standard could grow; it's stuck in the '70s.

Re:OpenBSD 7.0 by rsfinn on Thursday October 14, 2021 @12:43PM (#28866615)
Apple avoids GPLv3-licensed software, which may explain why they continue to ship an older version of bash (3.2, the last GPLv2 version). Eventually they must have decided that was too outdated to keep as the default shell and switched to zsh, which has an MIT-derived license.
Re:OpenBSD 7.0 by petre on Thursday October 14, 2021 @12:15PM (#28866268)
> Apple has switched from bash to zsh. I don't know the motivations for this

GPLv3 vs BSD or MIT license. I lived zsh anyway, switched some of my BSD shells to it afterwards.

Re:OpenBSD 7.0 by edgyquant on Thursday October 14, 2021 @12:26PM (#28866399)
I love zsh but it’s history doesn’t segregate based on the tty and it locks up a lot during autocompletion for me (on Ubuntu.)
Re:OpenBSD 7.0 by petre on Friday October 15, 2021 @01:35AM (#28874657)
I'm using it without any plugins and disabled autocompletion anyway, because it just gets in the way irrespective of the shell. Like not completing tar filenames if it doesn't like the extension (tar axvf) even if the file is there. Modren distributions 'helpfully' enable completion by default.

I don't like the fact that you have no way to clear the history buffer if you've accidentally dropped a password at the prompt. Bash has history -c. I don't have shared history enabled, you could unset that and it'll stop segregating.

Anyway, zsh is a lot more versatile and familiar than tcsh for instance, so it's almost always my go to shell on FreeBSD as /bin/sh is quite limited, but also miles ahead of the Debian shell regarding features.

Re:OpenBSD 7.0 by massysett on Thursday October 14, 2021 @03:47PM (#28869054)
This is not typically the default setting in zsh (it is if it’s acting like ksh.) Your distributor has probably “helpfully” set it up this way. man zshoptions and look for “SHARE_HISTORY”.
Re:OpenBSD 7.0 by edgyquant on Sunday October 17, 2021 @02:18PM (#28898494)
It's Ubuntu 18.04 with Oh My Zsh