yamlscript

2025-02-28T18:27:25.906779Z

How can I return exit status 1 from a ys script?

Ingy döt Net 2025-02-28T18:29:16.570809Z

ys -e 'exit: 1' ; echo $?

Ingy döt Net 2025-02-28T18:30:15.915819Z

ys -e '1:exit' ; echo $?
1

Ingy döt Net 2025-02-28T18:30:39.653359Z

ys -e 'exit(1)' ; echo $?
1

Ingy döt Net 2025-02-28T18:31:16.078709Z

ys -e '1.exit()' ; echo $?
1

Ingy döt Net 2025-02-28T18:32:14.976869Z

% ys -e '(exit 1)' ; echo $?
1
(If you must...) 😂

Ingy döt Net 2025-02-28T18:27:46.556869Z

exit: 1

Ingy döt Net 2025-02-28T18:27:48.676929Z

🙂

2025-02-28T18:27:57.610219Z

Oh easy, love it. Thanks

✅ 1
Ingy döt Net 2025-02-28T20:02:31.135359Z

I'm really excited to finally be able to announce this here... https://yamlscript.org/ has a brand new website! It's based off the amazing https://squidfunk.github.io/mkdocs-material/ static site framework. I've mixed in YS in various places that make working with it extra cool. YAML + Markdown + 100s of compatible Python plugins +YS 🙂 For instance try the edit button on https://yamlscript.org/doc/ys-std/. It uses MDYS (Markdown + YS) to define the page with data and then pass it through a small YS function to format the data into whatever markdown I want... I whipped up the "Discuss this page" button thing this morning. Play around with the site and let me know what you think!!

👏 1
🚀 3