4 ms·
Okay so this is clever – it's a polyglot, both a valid bash script and a DSL which is interpreted by some binary written in Rust and called at the final "eval $
by ktpsns 5y ago
Okay so this is clever – it's a polyglot, both a valid bash script and a DSL which is interpreted by some binary written in Rust and called at the final "eval $(argc...)" line, where "argc" is the name of the rust binary.
Thinking loudly: I was just wondering about debugging (kind of "does this lack source maps?"), but shell never prints out lines at syntax errors, so it does not really matter. One can write "set -e" anyway at the start of the functions in order to catch errors early.
- voakbasda 5y agoWith bash, you can write a function that gets called when a script exits with an error that can print a full stack trace. It just isn’t a default behavior.