News for hackers. Stuff that matters.
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.
Re:Mastering Bash and Terminal by bigbugbag on Sunday January 15, 2017 @07:08AM (#13403658)
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

Re:Mastering Bash and Terminal by pmoriarty on Sunday January 15, 2017 @01:43PM (#13405560)
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).
Re:Mastering Bash and Terminal by erikb on Monday January 16, 2017 @03:53AM (#13408882)
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.

Re:Mastering Bash and Terminal by pmoriarty on Tuesday January 17, 2017 @02:59PM (#13420626)
The web page you link to is mistaken. The zsh command "emulate sh" does not emulate bash. As the name says, it emulates sh, which is the bourne shell -- not bash.