Hacker News new | past | comments | ask | show | jobs | submit login

zsh is better than bash in nearly all aspects, at least in my use cases, so this is a great news for me. Is there anything that can be done in bash but not in zsh?



I've been using zsh on Linux for years (4 at least). I was creating a function that I wanted to run in zsh and bash and I think I ran into some option that was available on a builtin command in bash that wasn't on the zsh version. I can't remember the details though, because it was a while ago. I imagine if someone deals with shell scripts more regularly than I do they would run in to those kind of problems more than me.


zsh isn't a perfect super-set of bash (there are some differences in syntax, provided built-ins, &c.), but it does have equivalents for most of bash's functionality. Off the top of my head i can't think of anything useful that it's missing. People may have subjective preferences for e.g. readarray over parameter expansion, but the functionality is all there. I suppose it doesn't (and probably never will) fully conform to POSIX, if that's important to you


The only thing I noticed in 10 years of zsh use is that `printf "%b\n"` can be used in bash but not in zsh to unescape C-style strings: E.g. `printf "%b\n" '\"abc\"'` ==> "abc"


No, I think zsh is strictly more feature rich at the cost of a little more memory (like 1MB maybe). For macs this should be irrelevant.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: