From 0742955e2cb52d644fb868b21865149d2a6438f8 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 23 Nov 2026 15:55:44 -0300 Subject: help: `pardes help ` prints what `Help ` shows (one function writes both, core/Output.zig `writeWordHelp`: the builtin's row, its whole documentation, its keys, argument, what it acts on and its `pardes do` line), and the manual's glossary prints each word's whole documentation under it (the sinks of the one table, `registry.doc`: the user's "the CLI as living documentation, like 9P, maybe sharing the source with different sinks"): `pardes help ` read the word's line of /commands, a session's or a core made here, and printed its first sentence; now a builtin of this build is answered from the table with no tree asked (runtime/main.zig `help`), the name as the registry takes it (`pardes help index` stays the tree's file), and an addon's word, which only a session knows, as before from /commands; `pardes help`, `pardes words` and /commands keep one line a word, the summary; docs/typ/style.typ's `builtin-entry` prints `text`, a paragraph a line, where it printed `doc` (the summary); tests: test/process/cli.zig's help case (`pardes help Newcol`: its row and `acts on: the session (over 9P, the root ctl)`; `pardes help Save`: `from a shell: pardes do Save [ARG]`; `pardes help Diff`: its second paragraph's `Diff `); process-test (cli: help) 1/1, core-test (docs/typ) 9/9, Debug tui; the book builds in the change that regenerates builtins-gui.json (its words need `text` too) Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- docs/typ/style.typ | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/typ/style.typ b/docs/typ/style.typ index bf005c63..1b172dc8 100644 --- a/docs/typ/style.typ +++ b/docs/typ/style.typ @@ -188,7 +188,8 @@ /// Every builtin of either build, written by `zig build builtins-json` /// from the registry and the Help rows (core/builtins_json.zig), a file per /// build: name, leader, also (Help's other shortcuts), arg, scope, setting, -/// choices, doc, and for a shipped addon's word its addon first. Merged here, each with `platforms`: "both", "tui" (the +/// choices, doc (its summary), text (its whole documentation, a line a +/// paragraph), and for a shipped addon's word its addon first. Merged here, each with `platforms`: "both", "tui" (the /// terminal only) or "gui" (the window only). #let builtin-data = { let tui = json("builtins-tui.json") @@ -426,7 +427,8 @@ #if "addon" in b [#emph[the #raw(b.addon) addon's] · ] #if keys.len() > 0 [#keys.join([, ]) · ] #if b.choices != none [#raw(b.choices.replace(", ", "|")) · ] else if b.arg [takes an argument · ] - #prose(b.doc) + // its whole documentation (`text`), a paragraph a line, as Help shows it + #b.text.split("\n").map(prose).join(parbreak()) ] /// The glossary: everyday words first, then the groups, then internals, -- cgit v1.3