[][src]Crate oursh

Documentation Build Status Dependencies Gitter Chat

This shell should be both POSIX compatible and yet modern and exciting. Fancy features should not be prevented by POSIX compatibility. This will effect the design of the shell.

The name of the shell is oursh which is both somewhat unique, and memorable. It's also a nice name to play with pseudo-satirical themes... right comrade? It's short (ish) and sneakily fits rs in it, which is the extension of Rust programs, the language this will be written in.


Previous Work

I've been using fish as my main shell for a few years now. Fish inspires a lot of the modern syntax.

POSIX compatibility comes from my desire to use this shell as my chsh -s ... shell on Arch Linux. See the full POSIX reference for more information.

Some of the shebang language interoperation was inspired by my time with the Northeastern University PL group, and generally from writing Racket. The beauty of of merging the UNIX style #!... with Racket's #lang ... here is very exciting to me. I might just have to make a {#lang ...} shortcut for Racket!

I've built and wrote a few things about shells before:

POSIX Reference

See the following sections for building the POSIX sh compliant program language, and interactive terminal based REPL. While this mainly defines the posix module, there are a lot of common concepts to all shells here.



Subprocess execution management.


Parsing and handling program syntax(es) of the shell.


Quick and effective raw mode repl library for ANSI terminals.



Print debug information to stderr.