Design discussion/proposal: (default) shell choice

From philosophy · Wiki · LundukeOS / LundukeOS · GitLab :

Radical Terminal Experience - The command line experience should be not simply “First Class”, but truly extraordinary.

Proposed for your consideration: LCOS ships a default shell outside of the big-N of ksh/zsh/bash/tcsh/etc., something modern with better error handling, flow control, and perhaps even types. This conflicts somewhat with:

A system that is not constantly changing to use “the latest shiny thing”.

On the balance, though, a commitment to command-line first, and setting out to do something new and compelling with a distro, this change might be worth the effort.

My straw man proposal is the Oil shell (oils) but there’s plenty of good options now.

Ref Why Create a New Unix Shell? (2021)

I’d favor bash as the “basic” shell since it handles most of the common concerns with a shell like bourne while still being a reasonable bourne shell. And then we can pick a secondary fancy scripting language when bash is not enough.

To make the “terminal” a little more radical, I wonder if we’d consider something like terminology with it’s helpers.

https://manpages.debian.org/bullseye/terminology-data/terminology.1.en.html
https://manpages.debian.org/bullseye/terminology-data/tycat.1.en.html

4 Likes

Yes, bash please. I really like the idea behind this project, but if I have to learn a new shell language to use it, my interest will quickly fade.

4 Likes

Bash is a good start since many most likely have scripts they will want to transfer. It could always be possible to offer shell choice on setup also.

1 Like

I’ll throw in the most unpopular option. rc from plan9port.

2 Likes

I’m intrigued: could you expand on why?

As a general reply to the suggestions of bash: bash-compatibility doesn’t necessarily rule out Oil. Oil is bash compatible and can run many bash scripts without modification.

OSH is meant to run all POSIX shell programs, and most bash programs.

https://www.oilshell.org/cross-ref.html?tag=bash#bash
https://www.oilshell.org/release/latest/doc/known-differences.html

Not setting ${PIPESTATUS[@]} after every command will break me. I always have the following and use it liberally.

RCCHECK() {
    for rc in "${PIPESTATUS[@]}"; do
        (( $rc == 0)) || return $rc
    done
}

I can see issues with [[-v var ]], brace expansion and spaces in LHS indices. They say these difference will only affect sophisticated shell users. I think that is the audience we are targeting.

1 Like

I mostly write bash scripts. I rarely use alternative shells, that may have incompatible syntax.

1 Like

One alternative could be Batch. It can be converted to both bash and bat. But, it depends, does it work well enough.

I don’t really care what the default shell is. As long as deb packages are supported, I can install whatever in blazes I want, after-the-fact.

4 Likes

Bash is enough for me. You could make the default shell a choice in the installer?

1 Like

bash is definitely more in my wheel house- if it goes a different route I’ll live it its not a pain in the butt to install for whatever reason. I reckon we can address “Radical Terminal Experience” by shipping the environments with the finest terminal apps that they have to offer! I’m sure there is tons of cool stuff out there (I don’t adventure much though so I am mostly assuming.)

2 Likes

The new and shiny is not needed. Most people need compatibility, new distros are coming with zsh and fish and they frustrate me because I learned Linux with bash, and some things like Ctrl-r that I expect to work now do not. I don’t want to keep re-learninf the basics every time someone thinks it’s better their way. For better or worse, bash has been the default for decades and its what we know. I’d leave it as the default or at the very least, allow the choice of shell at first run.

3 Likes

I tend to agree. As much as I’ve gotten used to zsh on my Mac, I do prefer bash personally.

is the chsh command really that difficult?

For selecting a personal shell. No.

I’m taking the purpose of this thread to be to select a default user shell and/or the preferred shell for LCOS plumbing.

1 Like

you can change the default shell of the os just as easily as you can the shell for individual users.

I know. It used to be that in debian the bulk of the debian-isms (like package management and other plumbing) were developed in C, perl & bash. Now I believe it’s C, python & bash. Gentoo did it’s stuff in mostly bash & python. I think the point of this thread was to be a poster child distro for some newwizz bang shell in the name of meeting the requirement of providing a “Radical Terminal Experience”.

I expect initially we will be whatever Debian is. If we attract enough kids who are eager to write a unique LCOS personality in wizzbang shell, then it might become that. In anycase, I get the impression this thread was start to ask for more than just the value of $SHELL and files in /etc/.skel. Perhaps I’m wrong.

I have held back from commenting on this, but I am under the impression that changing the default shell would also require rewriting all of the shell scripts in the system to be compatible with that shell. This would mean that every time Debian updates, all of those scripts would have to be updated as well. If you had a large team of paid coders, this would not be a huge issue, but with a small group of volunteers, this is asking way too much of them.

Just stick with bash and keep it simple. Please.

2 Likes