On Tue, Dec 9, 2014 at 9:40 PM, Stephane Chazelas <stephane.chaze...@gmail.com> wrote: > 2014-12-09 20:55:02 +0800, konsolebox: > [...] >> As for the other things, I was actually only concerned about the >> dangerous behavior that's synonymous to "eval $b" so I didn't really >> thought about discussing them. And I'm only referring to Bash when I >> made the suggestions. Other shells certainly does not support local >> scopes. > [...] > > Not sure what you mean by that last sentence, but all of dash, > yash, mksh, pdksh, AT&T ksh, posh, zsh (so virtually all modern > Bourne-like shells) do support local scopes each with variations > of behaviour and syntax.
I know ksh, pdksh and zsh supports local but I didn't know that dash does it too - or maybe I forgot. I always remember that it's a pure POSIX shell but apparently it's not. And sorry I actually meant "some other". Consider a more conservative shell like heirloom-sh. Cheers, konsolebox