A Unix shell written in Haskell.
Well, a few reasons:
- Because I can.
- Shells exercise most of the capabilities a production-ready language needs, from I/O to process management to file and directory operations to string parsing to state management. About the only thing shells don't do much of is network I/O.
- It's accessible. My first Haskell project was an OpenSSH-compatible SFTP server which is somewhat obscure.
- Single-command parser
- Support for env vars through
setenv
andgetenv
- Settable prompts
- Ability to
cd
and run external commands $PATH
is consulted for command lookups; it automatically updates when$PATH
changes or a directory on the path is changed.
- Mis-invoking builtins (like
setenv foo
when the correct invocation issetenv foo bar
) causes the shell to treatsetenv
as an external command.
This is a programming exercise focused on an interactive command interpreter. I haven't much interest right now in building support for Bourne-style scriptability.
- (DONE) Basic command-line interpreter.
- (DONE) Shell-ish parser
- (DONE)
ENV
var support - (DONE) Trivial prompt generator
- (DONE) Fundamental builtins
cd
- (DONE) Command Look-Up Table creation from
$PATH
- (DONE and removed since it's no longer needed)
rehash
builtin - (DONE) Smart
rehash
based on$PATH
changes andmtime
s of each dir named in$PATH
- (DONE) Stop crashing on command
ENOENT
s. - (DONE) Shell variable substitution
- Output redirection
- Command-name tab completion
- Argument tab completion
- Programmable prompts