Starts shell as an interactive shell, or with -c command when command is nonempty.
The child inherits the environment with TERM=xterm-256color. Call before starting other threads.
Returns false on setup failure. Windows returns unsupported without importing POSIX.
Signature
open_session :: (
shell: string,
command: string = "",
cols: int = 80,
rows: int = 24
) -> (Session, bool)
session, ok := open_session("/bin/sh", "printf hello", 80, 24);
if ok close_session(*session);