3 ms·
That's a major reason that https://oils.pub/ https://oils.pub/ started out with the POSIX- and bash-compatible OSH, and then added YSH on top of it (while remov
by chubot 1y ago
That's a major reason that https://oils.pub/ https://oils.pub/ started out with the POSIX- and bash-compatible OSH, and then added YSH on top of it (while removing legacy)
In YSH, you can do everything that bash does with processes, because OSH is the most bash-compatible shell in the world: https://pages.oils.pub/spec-compat/2025-09-14/renamed-tmp/spec/compat/TOP.html https://pages.oils.pub/spec-compat/2025-09-14/renamed-tmp/sp...
For example, I think many of the newer shells don't implement process subs, a ksh/bash thing:
ysh-0.35$ diff -u <(seq 2 3) <(seq 1 4)
...
+1
2
3
+4
YSH also improves on bash by checking the error code from process subs, which bash simply ignores:
cat <(seq ) <(seq 1 4); echo hi
^~
[ interactive ]:39: errexit PID 693013: Command failed with status 1
BUT you can also do Python like stuff, pretty much exactly like ABS's example on the home page
var obj = {}
for n in (1 ..< 10) {
if (n % 2 === 0) {
setvar obj[str(n)] = 6 ** 2 # no rand function now
}
}
= obj # pretty print with =
# => (Dict) {'2': 36, '4': 36, '6': 36, '8': 36}
(hm I wonder if str(n) should be relaxed ...)
ABS is listed on this wiki page, along with many Python- and JavaScript- influenced shells:
https://github.com/oils-for-unix/oils/wiki/Alternative-Shells https://github.com/oils-for-unix/oils/wiki/Alternative-Shell...
https://koi-lang.dev/ https://koi-lang.dev/
https://github.com/alexst07/shell-plus-plus https://github.com/alexst07/shell-plus-plus
https://hush-shell.github.io/ https://hush-shell.github.io/
But YSH is the only one that has a process runtime that's a SUPERSET of bash
---
I also want to add to add xargs-like functionality to the runtime. I mentioned in the latest release that bash/xargs actually has a problem with waiting for processes in parallel, while ALSO checking for errors:
Eight Releases of Oils in 6 Months: https://oils.pub/blog/2025/09/releases.html https://oils.pub/blog/2025/09/releases.html