News for hackers. Stuff that matters.
Re:s/bash/zsh/g by pmarreck on Wednesday October 20, 2021 @09:27AM (#28930388)
Would love to be able to transpile zsh or any other higher level scripting language into Bash for portability reasons alone. Is there something that converts bash, sh, or zsh into an AST?

Also useful would be a tool that tells me if I'm using a zsh construct that isn't supported in bash... or even better, how to do it in bash

Re:s/bash/zsh/g by arp242 on Wednesday October 20, 2021 @11:44AM (#28932099)
The shfmt parser seems re-usable: https://github.com/mvdan/sh (syntax subpackage).
Re:s/bash/zsh/g by kej on Wednesday October 20, 2021 @12:23PM (#28932587)
Not really what you're asking for, but a language that compiles to bash for portability reminded me of Batsh [0], a C-like language that compiles to bash for Linux/Mac and batch for Windows.

[0] https://github.com/batsh-dev-team/Batsh