Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#16001 closed enhancement (invalid)

Replace Bash with zsh

Reported by: bitigchi Owned by: jackburton
Priority: normal Milestone: Unscheduled
Component: Applications/Terminal Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Change History (11)

comment:1 by pulkomandy, 4 years ago

bash was picked originally because it's what BeOS used.

I would lean towards something as simple as possible like mksh as the default shell, but maybe that's just me. And I already hear the fish supporters advocating their option coming :)

comment:2 by waddlesplash, 4 years ago

Resolution: invalid
Status: newclosed

We also use GNU coreutils, grep, sed, gawk, WebKit's JavaScriptCore, and quite a lot of other things in the default install that are GPL'ed, and do not really have any intention of switching, partially because the BSD licensed counterpartts (like zsh) behave in very different ways or lack significant features vs. the GPL'ed ones.

The point is that these can be, by the user, easily swapped out (you can already change your default shell, port bsdutils instead of coreutils, etc.) Eventually we do want to eliminate all GPL from the base system, but there is no reason we need to eliminate it from base packages, especially if doing so would mean a major functionality loss.

comment:3 by pulkomandy, 4 years ago

Calling zsh a functionality loss over bash is not realistic. There are possible backwards compatibility problems, which are what blocks us from changing the shell presently, and when we move on to R2, besides features, we should also consider maintenance of the project, and security considerations. It can be reconsidered then.

comment:4 by waddlesplash, 4 years ago

Well, most Linux distros still use bash as the default shell, and have similar problems switching to zsh or something like that.

comment:5 by bitigchi, 4 years ago

macOS recently switched to zsh with Catalina, and it was a very welcome change among developers.

comment:6 by nephele, 4 years ago

Macos was on an ancient version of bash, mainly because they wanted to get rid of gpl too (but the version they had was gplv2 so less pressing), in any case i personally would be in favor of mksh too, but currently parts of the system depend on bash, e.g haikuports assumes the interpreter is bash, untill that changes it doesn't make much sense to try and replace bash.

comment:7 by tqh, 4 years ago

I used zsh before, and I went back to bash. Not really liking the idea of zsh. IIRC (long time since then) it was slow and felt laggy, but maybe that was the ohmyzsh.

Is there any way we can check how well a shell performs (responsiveness, cpu, mem and features) in an objective way?

comment:8 by pulkomandy, 4 years ago

Comparing ohmyzsh with plain bash isn't fair. You can make bash very slow by installing similar additions to it too. I think we don't want to ship Haiku with a very advanced config like that, but more likely something plain and simple to start with and then let people customize it as they want.

comment:9 by tqh, 4 years ago

Yes, it wasn't really a comparison more my personal experience of it. The point I was trying to make was that we should try to have a objective comparison instead.

comment:11 by tqh, 4 years ago

The speed comparison is interesting. When you compile Haiku with jam, a shell is started for each cmd because of glob'ing. So launch speed is quite important for scripts and compiling things. (Ubuntu uses dash to improve this.)

Howevever it is hard to know if they were configured the same and read in the same info on startup, so we don't get that much info other than that zsh is not slow.

Note: See TracTickets for help on using tickets.