Tuesday, May 24, 2011

[kbnifskk] Explicitly require stdin from console

Create a shell where commands (or command pipelines) by default do not accept standard input from console, that is, there is an implicit foo < /dev/null .

If you want console input, you hook it in explicitly, for example stdin | foo (In real life, "cat | foo").

But you can hook in fancier input mechanisms:
readline | foo
ncurses | foo

Maybe a mechanism for specifying and editing tree data structures (e.g., Lisp or XML) as input.

Inspired by the low bandwidth terminal, specifically the problem of what to do if the output filter waits for the last page (or an EOF or a first full page), but hangs waiting for console input.  Heavy handed solution: get rid of console input.

No comments :