From c6a5a40f68f8a341961b1475addc73bb0de9a0f3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 23 Nov 2026 16:01:44 -0300 Subject: help: the words of terminals and commands documented for a user (item 5's fifth group: `Term`, `Kill`, `Filter`, `Repl`, `Mount`, `Unmount`, `Msg`), each sentence checked against its run (core/builtins.zig, core/exec.zig `spawnTty`): Term (below this pane, in its directory, raw at once; `Term fish` as the tag word `Term+fish`; a shell or a directory that is not there said; was: two blocks, "A shell in the calling pane's directory ... On every pane's tagline: the fast path ..." then "A terminal below the caller ..."), Kill (the lines pardes typed and its command panes; a command pane's whole command, a terminal's foreground job, never its shell), Filter, Repl (`Repl python`, `Repl -`, bare; the language as a code fence names it; what is typed into it and what stays a command), Mount (`Mount `, the dial's four forms; one that cannot be reached is said and not kept), Unmount, Msg; docs/typ/builtins-tui.json regenerated Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/builtins.zig | 38 +++++++++++++++++++++----------------- docs/typ/builtins-tui.json | 12 ++++++------ 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/core/builtins.zig b/core/builtins.zig index 599a0d97..fb072141 100644 --- a/core/builtins.zig +++ b/core/builtins.zig @@ -534,10 +534,10 @@ pub const Exit = struct { /// Stop the commands pardes started that are still running. /// /// They are the lines pardes typed into a terminal (from an exec, a middle -/// click, a pty/run) while their shell says they run. Bare, every one; `Kill -/// make ls`, those whose line starts with one of the words. Each gets -/// SIGTERM, sent to its terminal's foreground job, never to the shell, which -/// stays. +/// click, a pty/run) and its command panes. Bare, every one; `Kill make ls`, +/// those whose line starts with one of the words. Each gets SIGTERM: a +/// command pane's whole command, a terminal's foreground job, never its +/// shell, which stays. pub const Kill = struct { // acme's Kill (exec.c, `kill`; acme.c's WKill) posts the "kill" note, // which ends a process; here a terminal's job between its C and D marks. @@ -705,6 +705,10 @@ pub const Upgrade = struct { }; /// Mount another pardes's 9P tree under /n/, given its dial address. +/// +/// `Mount `, the dial `unix!/path`, a socket's path, +/// `tcp!!` or a session's name. One that cannot be reached +/// is said at once, and not kept. pub const Mount = struct { pub const scope: Scope = .session; pub const takes_arg = true; @@ -745,7 +749,7 @@ pub const Mount = struct { } }; -/// Unmount the 9P tree mounted under /n/. +/// Unmount the 9P tree mounted under /n/: `Unmount `. pub const Unmount = struct { pub const scope: Scope = .session; pub const takes_arg = true; @@ -767,7 +771,7 @@ pub const Unmount = struct { // ---- the message row ---- -/// Show its argument on this pane's message row. +/// Show its argument on this pane's message row: `Msg built`. pub const Msg = struct { pub const takes_arg = true; pub const requires_arg = true; @@ -1438,10 +1442,12 @@ pub const DelBelow = struct { } }; -/// A shell in the calling pane's directory, raw from the first frame. On every -/// pane's tagline: the fast path from wherever you are to a prompt there. -/// A terminal below the caller in its directory: the configured shell, or -/// the one named, `Term fish`, as a terminal's own tag word `Term+fish` says. +/// Open a terminal below this pane, in its directory, raw: its keys the +/// shell's at once. +/// +/// `Term fish` runs that shell instead of the Shell setting's, as a +/// terminal's own tag word `Term+fish` says; a shell that is not there is +/// said. A directory that is not there makes no terminal. pub const Term = struct { pub const takes_arg = true; pub const plus_arg = true; @@ -1465,18 +1471,16 @@ pub const Term = struct { /// Bind this terminal as a language's REPL: an exec on that language's files /// is typed into it. /// -/// The language is named as the syntax table has it (`py`, `Python`, `sh`). +/// `Repl python` binds it (the language named as a code fence names it: `py`, +/// `Python`, `sh`); `Repl -` unbinds it; bare, it says what it is bound as. /// An exec made on the body of a file in that language (a middle click, the /// execute key, a single word like `ls` as much as a selection), and one made /// on this terminal's own body, is typed into it (bracketed paste if its /// program asked for that, else line by line, then Enter) instead of run. -/// `Repl python` binds (again, it is already); `Repl -` unbinds; bare, it -/// says what it is bound as. With several bound for a language, the exec asks -/// which. +/// With several bound for a language, the exec asks which. /// -/// Still commands, whatever is bound: a word in a tag, `Exec ` run by -/// name (typed, a 2-1 chord onto Exec, a ctl line), and a command word @`cmd` -/// in the text, looked at or clicked. +/// Still commands, whatever is bound: a word in a tag, `Exec `, a ctl +/// line, and a command word @`cmd` in the text, looked at or clicked. pub const Repl = struct { pub const takes_arg = true; pub fn run(c: Ctx) void { diff --git a/docs/typ/builtins-tui.json b/docs/typ/builtins-tui.json index 12631603..5b6ede24 100644 --- a/docs/typ/builtins-tui.json +++ b/docs/typ/builtins-tui.json @@ -53,7 +53,7 @@ {"name": "Joincol", "leader": "SPC c j", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Fold the keyboard's column into the one on its right, keeping its panes.", "text": "Fold the keyboard's column into the one on its right, keeping its panes.\nRefused for the last column, and where the joined column could not give each pane its tag and 2 rows."}, {"name": "JumpTrail", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A jump of the cursor leaves a short trail that fades, on or off.", "text": "A jump of the cursor leaves a short trail that fades, on or off."}, {"name": "Jumplist", "leader": "SPC j l", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the places jumped from, each a place to go.", "text": "List the places jumped from, each a place to go."}, - {"name": "Kill", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Stop the commands pardes started that are still running.", "text": "Stop the commands pardes started that are still running.\nThey are the lines pardes typed into a terminal (from an exec, a middle click, a pty/run) while their shell says they run. Bare, every one; `Kill make ls`, those whose line starts with one of the words. Each gets SIGTERM, sent to its terminal's foreground job, never to the shell, which stays."}, + {"name": "Kill", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Stop the commands pardes started that are still running.", "text": "Stop the commands pardes started that are still running.\nThey are the lines pardes typed into a terminal (from an exec, a middle click, a pty/run) and its command panes. Bare, every one; `Kill make ls`, those whose line starts with one of the words. Each gets SIGTERM: a command pane's whole command, a terminal's foreground job, never its shell, which stays."}, {"name": "Last", "leader": "SPC j j", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Go back to the last place jumped from in another pane.", "text": "Go back to the last place jumped from in another pane."}, {"name": "Left", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane, or column tag, to the left.", "text": "Move the keyboard to the pane, or column tag, to the left."}, {"name": "LocationsConfig", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Set how location rows are drawn, or show how they are when bare.", "text": "Set how location rows are drawn, or show how they are when bare."}, @@ -67,8 +67,8 @@ {"name": "Mini", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Open a minimap of the file in braille dots.", "text": "Open a minimap of the file in braille dots."}, {"name": "Mode", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Step this pane to its next input mode: normal, insert, and in a terminal raw.", "text": "Step this pane to its next input mode: normal, insert, and in a terminal raw.\nFrom the last it goes back to normal. The keyboard goes to the pane's text."}, {"name": "More", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Let a query pane's Grep stopped at its 2000 lines go on for 2000 more.", "text": "Let a query pane's Grep stopped at its 2000 lines go on for 2000 more."}, - {"name": "Mount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Mount another pardes's 9P tree under /n/, given its dial address.", "text": "Mount another pardes's 9P tree under /n/, given its dial address."}, - {"name": "Msg", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Show its argument on this pane's message row.", "text": "Show its argument on this pane's message row."}, + {"name": "Mount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Mount another pardes's 9P tree under /n/, given its dial address.", "text": "Mount another pardes's 9P tree under /n/, given its dial address.\n`Mount `, the dial `unix!/path`, a socket's path, `tcp!!` or a session's name. One that cannot be reached is said at once, and not kept."}, + {"name": "Msg", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Show its argument on this pane's message row: `Msg built`.", "text": "Show its argument on this pane's message row: `Msg built`."}, {"name": "New", "leader": "SPC f n", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Open an empty scratch pane, +New, in this pane's directory.", "text": "Open an empty scratch pane, +New, in this pane's directory.\nIt takes the keyboard. Save asks it for a path to write to; past 100 bytes, Exit, Del and Restore ask about its text as about a file's."}, {"name": "Newcol", "leader": "SPC c n", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Make an empty column right of the keyboard's, its tag taking the keyboard.", "text": "Make an empty column right of the keyboard's, its tag taking the keyboard.\nThe next pane made from there goes in it. Refused, saying why, when no column fits."}, {"name": "NextColor", "leader": "SPC t n", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Switch to the next bundled theme.", "text": "Switch to the next bundled theme."}, @@ -81,7 +81,7 @@ {"name": "Redo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Redo the last undone edit.", "text": "Redo the last undone edit."}, {"name": "Refs", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the references to the symbol under the cursor.", "text": "List the references to the symbol under the cursor.\nWith an argument (a 2-1 chord's selection), to that symbol, where it is nearest."}, {"name": "Rename", "leader": "SPC l r", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Rename the symbol under the cursor everywhere, to its argument.", "text": "Rename the symbol under the cursor everywhere, to its argument."}, - {"name": "Repl", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Bind this terminal as a language's REPL: an exec on that language's files is typed into it.", "text": "Bind this terminal as a language's REPL: an exec on that language's files is typed into it.\nThe language is named as the syntax table has it (`py`, `Python`, `sh`). An exec made on the body of a file in that language (a middle click, the execute key, a single word like `ls` as much as a selection), and one made on this terminal's own body, is typed into it (bracketed paste if its program asked for that, else line by line, then Enter) instead of run. `Repl python` binds (again, it is already); `Repl -` unbinds; bare, it says what it is bound as. With several bound for a language, the exec asks which.\nStill commands, whatever is bound: a word in a tag, `Exec ` run by name (typed, a 2-1 chord onto Exec, a ctl line), and a command word @`cmd` in the text, looked at or clicked."}, + {"name": "Repl", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Bind this terminal as a language's REPL: an exec on that language's files is typed into it.", "text": "Bind this terminal as a language's REPL: an exec on that language's files is typed into it.\n`Repl python` binds it (the language named as a code fence names it: `py`, `Python`, `sh`); `Repl -` unbinds it; bare, it says what it is bound as. An exec made on the body of a file in that language (a middle click, the execute key, a single word like `ls` as much as a selection), and one made on this terminal's own body, is typed into it (bracketed paste if its program asked for that, else line by line, then Enter) instead of run. With several bound for a language, the exec asks which.\nStill commands, whatever is bound: a word in a tag, `Exec `, a ctl line, and a command word @`cmd` in the text, looked at or clicked."}, {"name": "Restore", "leader": "SPC s r", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Replace every pane with those of a dump.", "text": "Replace every pane with those of a dump.\n`Restore