Drew DeVault introduces rc, a new Unix shell written in Hare (~2500 lines), inspired by Plan 9's rc shell but with notable departures. Key improvements over POSIX/Bash include eliminating the quoting nightmare by treating strings and lists as distinct first-class types, list slicing, named function parameters, and `{} syntax for command substitution. The shell already supports pipelines with arbitrary file descriptors, redirects, boolean compound commands, loops, and functions. It features a formal context-free grammar and uses the madeline library for interactive mode with history and fish-style completion. Future plans include arithmetic expansion, named pipes, sub-shells, and a possible rename.

5m read timeFrom drewdevault.com
Post cover image

Sort: