Bash vs. zsh

Discussion of software apps
Post Reply
wove
Posts: 1188
Joined: Mon May 04, 2020 4:47 pm

Bash vs. zsh

Post 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.
User avatar
tlmiller
Posts: 4848
Joined: Tue Jan 16, 2018 12:29 pm
Location: AZ, USA

Re: Bash vs. zsh

Post 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.
wove
Posts: 1188
Joined: Mon May 04, 2020 4:47 pm

Re: Bash vs. zsh

Post 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?
User avatar
tlmiller
Posts: 4848
Joined: Tue Jan 16, 2018 12:29 pm
Location: AZ, USA

Re: Bash vs. zsh

Post 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.
Post Reply