Page 1 of 1
Bash vs. zsh
Posted: Thu May 20, 2021 3:10 pm
by wove
I have noticed a recent trend to move from using the bash shell to using zsh. Can anyone tell me why zhs has become a more popular option than bash? If given a choice I stick with bash simply because it was the default shell, but in honesty, I really have no clue what constitutes a "good" shell.
Re: Bash vs. zsh
Posted: Thu May 20, 2021 9:18 pm
by tlmiller
I honestly think a lot of it is just "want to be different to be different" syndrome. And I totally get that. Zsh DOES have some advantages over bash, such as a much superior tab-completion feature. Zsh has autocorrect as well, and will also detect if you mistype a command and ask if you want to correct it. Those are the 2 biggest reasons I know MOST people that run zsh choose it for. There are others, although the shells are very similar overall, unlike ksh and bash which I find completely confusing when attempting to use.
Re: Bash vs. zsh
Posted: Fri May 21, 2021 2:53 am
by wove
When I used Macs they came with AppleScript. I gave BeOS a real try for a while, because it ran on Apple hardware. BeOS did scripting via shell scripts and it used the bash shell. I picked up a book for O'Riley on bash shell scripting so I could pick up that scripting. AppleScript is much easier than bash shell scripting. Is shell scripting about the same regardless of the shell in question?
Re: Bash vs. zsh
Posted: Fri May 21, 2021 2:18 pm
by tlmiller
Well, I've only done scripting in dash (what most distros actually use for plain ole /bin/sh nowadays) and bash, so can't say for sure, but what I've done I'd say is mostly about the same regardless of the shell. The biggest difference I've found is that there are some things that dash can't do (since it's designed to be simpler, it's commands simply don't feature all the options) that bash can. But I've never scripted in zsh or ksh, so I can't say for certain, but I'd suspect so.