Skip to the content.

Slash

A Unix shell with structured commands, composable pipelines, and first-class jobs — one grammar, end to end.

CI

Slash

Slash is a Unix shell built around a three-stage execution model: Shape (parsed structure) → Program (lowered executable semantics, immutable) → Job (runtime instance with process group, pids, state, result). The same grammar drives parsing, syntax highlighting, completion, and editor behavior. There is no second tokenizer, no regex highlighting hack, no separate configuration language.

Slash chooses correctness over POSIX compatibility in the places shells have historically lied:

What ships today

Install

Slash requires Zig 0.16.0.

git clone https://github.com/shreeve/slash
cd slash
zig build -Doptimize=ReleaseFast
./bin/slash --version

The bin/slash binary is self-contained — no runtime dependencies beyond libc and a TTY. Copy it anywhere on your $PATH.

Quick start

# Run interactively (in slash)
./bin/slash

# One-liner
./bin/slash -c 'echo hello, world'

# Run a script
./bin/slash my-script.sh arg1 arg2

Drop the .slashrc.example template at ~/.slashrc and uncomment the recipes you want:

# Prompt
export PROMPT='%F{#ecede8}%K{#43669d}%D{%H:%M:%S} %F{#43669d}%K{#81a1c7}%F{#ecede8} %n@%m %F{#81a1c7}%K{}%F{#ecede8}%k %~> %f'

# Editor-time abbreviations
str ll { ls -la }
str gst { git status }

# Key bindings
key Esc-L "ls -la\n"
key Esc-G "git status\n"

Documentation

The full design lives in markdown in the repo:

A man slash page lives at docs/slash.1 in the repo. Install it manually with:

sudo install -m 644 docs/slash.1 /usr/local/share/man/man1/

Tests

166 tests covering parse, lower, runtime, builtins, signal/job discipline, and interactive editor behavior:

zig build test

CI runs on Linux + macOS for every push; status badge at the top of this page reflects the latest main.

Credits

The interactive line editor is zigline — a separate project that grew alongside slash to provide the primitives a modern shell needs: hint hooks, transient input mode, mid-prompt printAbove, and the keymap layer slash extends.