Skip to content

Add interactiveShell to embed a full shell process #3

@Vindaar

Description

@Vindaar

It would to be nice add something like interactiveShell, which would spawn a long running full shell process with working stdin / stdout / stderr.

For a start this would allow us to turn one into successive calls of commands, which we feed the shell via the input stream, instead of relying on concatenating them via &&.

On the other hand, while never the original intent of this module, having a super simple interactiveShell() call to launch a full system shell sounds like a fun idea.

Short prototyping via osproc.startProcess wasn't very successful though. Calling any command will just cause the process to stop once the command ran (which makes sense). On the other hand, explicitly launching a shell as a process, e.g. startProcess("zsh", options = {...}) seems to make it impossible to access the input and output streams. The streams we have access to are probably the ones from the session that launches zsh, instead of the streams of the launched shell. That also makes sense.

However, how to work around this and achieve what I want, I don't know. I will have to do some research on that at some point. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions