POSIX shell written in Zig
- Zig 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| LICENSE | ||
| README.md | ||
wsh
Wizard Shell
This is a passion project to learn how POSIX shells work. This is my first real project at least that I plan to finish (let's see how that goes). The objective is to eventually get this to be daily driveable and fully POSIX compliant.
Build
Requires a recent Zig master (0.17.0-dev).
zig build -Doptimize=ReleaseFast -Dstrip
Supports:
- Quoting ("wizard's spellbook", wizard\'s academy) [backticks not supported yet]
- autocomplete (absolute and relative)
- pipes
>,1>,2>, and the>>equivalents<input redirection and<<heredocs- fd duplication (
2>&1,>&2) and&>/>&(redirect both) &&and||command chaining,;separators&background jobs- home directory paths (
~) - builtins supported (so far): echo, cd, exit, pwd, type
- backspace and delete
- left and right arrow key scrolling
- default? set enviornment variables ($TERM)
- reverse search on shell history
- completion menu
- ctrl-r history search
- bang commands
TODO/wish list:
- echo enviornment variables
- remaining POSIX operators (
<&,<>, arbitrary fds like3>,!negation) - job control (
jobs,fg,bg) - all POSIX builtins (export, alias, shopt, etc.)
- shell scripts
- rc file
- vi mode
- base16 and 256 custom color prompts