The key idea is that OSH and YSH can run "headless" with the "FANOS" protocol (file descriptors and netstrings over unix domain socket), which has a tiny implementations in C and Python
The reason we use FD passing with Unix sockets is so that anything that uses terminal still works:
ls --color
pip install
cargo build
All these programs will output ANSI color if `isatty(stdout)` is true (roughly speaking).Most people didn't quite get that -- they thought we should use "nREPL" or something -- but my opinion is that you really need a specific protocol to communicate with a shell, because a shell spawns other programs you still want to work.
---
Here is a pure Python 3 implementation of the recv() side of FANOS in only ~100 lines
https://github.com/oilshell/oil/blob/master/client/py_fanos....
It uses the recvmsg() binding . I'm pretty sure node.js has that too? i.e. it has Unix domain socket support
---
Anyway, thanks for taking a look - we're interested in feedback!
That is, the shell itself is a limitation
OSH is the most bash-compatible shell by a mile, AND we can easily add new hooks and so forth.
I think most stuff can be already done with FANOS, but I think completion is one area that needs some testing / feedback. For example, I imagine that when constructing a pipeline, you might want to complete exactly what's available -- like shell functions that the user has defined ?
Is there a place y’all hang out or a way you communicate? I foresee needing some guidance in places.