First time installing a distro that came with zsh instead of bash
First time installing a distro that came with zsh instead of bash
I’m moving my posts from Reddit to Lemmy before delete them.
This post is from 2020-09-03.
First time installing a distro that came with zsh instead of bash
I’m moving my posts from Reddit to Lemmy before delete them.
This post is from 2020-09-03.
Okay, you guys get the once in a liftetime chance to convince me that Bash is not the way to go. I'll eagerly await your proposals.
Zsh, an extended version of the Bourne Shell (sh), offers a plethora of compelling reasons why it surpasses Bash in terms of functionality and customization.
While Zsh undeniably offers a wealth of advantages, it is worth noting that it has a steeper learning curve compared to Bash, especially for users unfamiliar with advanced shell features. Additionally, Zsh consumes more memory due to its more complex data structures and advanced functionality.
Automatic cd: Zsh simplifies directory navigation by enabling users to change directories simply by typing the name of the desired directory. This feature eliminates the need to type the “cd” command explicitly, saving time and keystrokes.
What if there happens to be a command with the same name?
Hi, how can I install zsh in Windows 10?
Some of those options exist in Bash too, but need to be enabled in your profile: https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html. Bash is also more like to be available on random machines that you have access to. Lastly, if you’re working a lot with Bash scripts in your (work) environment you might feel more at home using Bash in interactive mode too.
Those are just some counter arguments for the sake of completeness. I think zsh is great, even though I personally don’t use it (yet).
OK GPT, now give me 7 reasons why Bash is better than zsh, please!
There are two massive points no one has mentioned yet.
$array
actually expands to every element in an array.Compare this between Bash and Zsh:
a=('/* hello */' 'world!' ' ') printf '"%s" ' $a
$array
actually expands to every element in an array.
Very convenient. But ~every shell script is written in bash or POSIX(y) sh. When I need to write shell scripts I begin with busybox sh compability. If it turns out to be too complex, I'll convert to bash. This is because if I ever would publish the script it would have better changes to be accepted as a PR for example. Yes. Bash is a mess. I don't even like it that much. It's okay. But it's more standard then zsh. Although I've seen the tides turn on some occasions, like macOS.
Maybe some day I'll give zsh a second chance.
sh scripts can be run in even the dumbest distro out there, bash, not so much
The debate was between zsh and bash, not necessarily POSIX sh.
So what exactly is so great about it?
From my point of view, it's great because I'm lazy.
Which distro ships with zsh?
Manjaro, at least the KDE and GNOME editions