Plus Shell (Dlang runtime)
Write this so someone with no background can follow.
Stance pivot
FreeCLI previously documented advocate Nushell, do not reinvent. That stance applied while the gap was standards and companion libraries.
The gap is now session context, display layers, control plane, and syntax modes in one runtime — large enough to ship Plus Shell as our shell in Dlang, with Nushell preserved as a compatibility mode baseline, not as the implementation host.
Nushell (Rust) remains credited and recommended for users who want upstream Nu only. Plus Shell is for users who want FreeCLI layers, context chrome, and room to improve formatting without waiting on upstream.
Repository
Primary: FreeCLI/plush (planned) — Dlang, dub.sdl, {FreeCLI} Certified target.
Not FreeCLI/nushell fork as runtime (archived direction). Rust Nushell source tree is a reference corpus for nu mode parity.
Companion repos unchanged: shell-context, terminal (shell-host), prohelp, nu-emit, project-map.
Syntax modes (one session, swappable parser)
| Mode id | Role | Notes |
|---|---|---|
|
Plus Shell native syntax + structured pipelines + FreeCLI display/context layers |
Product default. Formatting and UX may diverge from Nushell where we improve clarity |
|
Nushell compatibility |
Reproduce upstream behavior/format as baseline; parity tests against Nushell releases |
|
POSIX/bash-ish classical syntax |
Pipes, |
|
fish-style friendly syntax subset |
Later; same compatibility pattern |
|
zsh extensions where distinct from bash mode |
Later; avoid pretending one mode covers all POSIX dialects |
Session stores $syntax-mode (name TBD). Prompt token shows mode: grey mode: oso / mode: nu / mode: bash.
Swap: display layers — Ctrl+PgUp/Ctrl+PgDn, mode selector on Ctrl+1.
Default vs compatibility (critical)
Default oso mode is not “Nushell with patches.”
It is the syntax and rendering we own — informed by Nushell’s structured pipeline model but free to change:
-
Table/list formatting and width rules
-
Error message shape and context hints
-
Literal syntax where FreeCLI clarity wins
-
Integration with context tokens, prompt gutter, and overlay layers (first-class)
nu mode exists so scripts, docs, and muscle memory transfer.
Implement by porting/reproducing Nushell semantics in D against upstream fixtures — not by shelling out to nu binary (except optional escape hatch for parity debugging).
Nushell as baseline (how)
| Artifact | Use |
|---|---|
Nushell Rust repo @ pinned tag |
Reference for parser/eval behavior in |
Upstream test corpus / recorded sessions |
Parity oracles (subset initially) |
Plus Shell |
New tests; no requirement to match Nu output byte-for-byte |
Display golden files |
Separate per mode — |
Phase 0: document mode matrix + fixture layout in plush/tests/parity/nu/.
Phase 1: minimal oso parser + pipeline + one builtin; stub nu mode parser fed by fixtures.
Phase 2: context + layers in runtime (link display layers).
Dlang why
-
Consistent with project-mapunchecked and FreeCLI D libraries
-
Single language for shell runtime +
shell-context+ terminal protocol experiments (via dlang-supplemental interaction mods) -
Long-running process + typed pipelines fit D well
Rust remains fine for nu-emit C API and small native tools; the shell REPL is D.
Relationship to other FreeCLI products
| Product | Relationship |
|---|---|
Implemented inside |
|
Session |
|
prohelp |
Optional; shell-agnostic sibling — auto-detect help in prompt gutter when installed (not bundled) |
Still true: separate transport from presentation — Plus Shell is how we ship that |
Non-goals (v0)
-
100% Nushell language coverage on day one
-
Replacing every bashism in v1 bash mode
-
Bundling prohelp or Composio
-
Calling
nusubprocess as the default execution path
Typography
Default terminal/cell font: Consolas (curated for FreeCLI chrome visual language — not "any monospace"). Users and host chrome may override; see typography for fallback stack and rationale.
Prompt and host chrome
-
Prompt spatial layout — line mode and arrow/
mode -
Host chrome negotiation — mode-engaged top bar; overlay fallback