Hacker News new | ask | show | jobs
by bananskalhalk 796 days ago
Seems to work in zsh too. Both bash and zsh are shells like c-shell ksh etc. Nowhere is it implied that shell-scripts are written for Bourne shell.
2 comments

I am not familiar with zsh, but is it really interpreted by zsh? Because the script has #!/usr/bin/env bash in its shebang, isn't it executed by bash on your system, even if launched from zsh?
It seems to be very source-able in both bash and zsh. If you just executed it, it will run in bash.

They seem to have gone through some effort for this to be true.

both bash and zsh are orders of magnitude more complex than sh or even ksh