Re:Mastering Bash and Terminal
by erikb on Sunday January 15, 2017 @04:31AM
(#13403227)
Also, when you use a lot of scripts that only work with bash (there are more than you'd expect, despite zsh saying it is bash compatible) then you have the choice of either rewriting these scripts or using bash. Most ppl will choose not to rewrite.
[ Parent
| on HN ]
Many scripts are not written to be portable, bash or otherwise. The main reason those scripts rely on bashisms is that bash has long been the default shell in most distro.
IIRC debian provides a checkbashisms to know which scripts will pose problems when ran against /bin/sh
zsh never claimed it was compatible with bash. I'm not sure where you got that impression from. Maybe you're thinking of sh -- the bourne shell -- which zsh is in fact compatible with (as long as you limit your scripts to the bourne shell subset of zsh).
I'm not sure, where I've read it specifically, but it was a feature I was looking fore before switching to zsh about 5 years ago. What I found now is this: https://wiki.archlinux.org/index.php/zsh
Anyways. The core point is that compatibility often means compatible in 90%-99% of the cases. It's really really hard to be 100% compatible, which also requires one to emulate bugs etc.