#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
zsh has a MIT-like licence.
https://en.wikipedia.org/wiki/Z_shell https://github.com/zsh-users/zsh/blob/master/LICENCE
Change History (11)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
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 , 5 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 , 5 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 , 5 years ago
macOS recently switched to zsh with Catalina, and it was a very welcome change among developers.
comment:6 by , 5 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 , 5 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 , 5 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 , 5 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:10 by , 5 years ago
Some 3rd party reviews:
https://www.howtogeek.com/362409/what-is-zsh-and-why-should-you-use-it-instead-of-bash/
https://sunlightmedia.org/bash-vs-zsh/
https://stackabuse.com/zsh-vs-bash/
https://apple.stackexchange.com/questions/361870/what-are-the-practical-differences-between-bash-and-zsh
This one has a speed comparison as well:
https://dev.to/jasmin/a-brief-difference-between-zsh-and-bash-5ebp
comment:11 by , 5 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.
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 :)