Unix userland as C++ coroutines
C++
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pch
.gitignore
COPYING
meson.build
readme.md
shell.cpp
shell.h

readme.md

Unix userland as C++ coroutines

A very basic Unix shell implementation which does not spawn any processes but instead implements shell pipelines with cooperative multitasking

Limitations

Only a few commands are implemented. There are no background processes, stdio redirection apart from the pipe, environment variables or the like. Spawning external programs is also not supported.

Running

Compile the app and run babyshell. Then type commands such as:

cd subdir
ls
cd ..
cat build.ninja | sort | uniq
ls | grep build

None of the commands takes file arguments so you need to use cat.

To end the shell type exit to quit or just hit ctrl-c.

More info

Blog post.