diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-26 21:45:46 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-26 23:24:00 -0300 |
| commit | 24dc19130fd6a063bb7e86fa21a02d7af4c3b163 (patch) | |
| tree | 761d6a1b439f5ea31f3679c8b4f2874e0acfbeb7 /core | |
| parent | 8d2a064eb69a1f888c435c3a0e03468b59abbb0d (diff) | |
| download | pardes-24dc19130fd6a063bb7e86fa21a02d7af4c3b163.tar.gz pardes-24dc19130fd6a063bb7e86fa21a02d7af4c3b163.zip | |
Root, and the explicit root keys SPC f F, SPC f G and SPC :: Find, Grep and the `:` line run at the project's root, the nearest directory at or above the asking pane's holding a `.jj` or a `.git` (Pick.workTree, kept by zxsqtpol for this), the pane's own when none does, while SPC f f, SPC f g and `:` keep acme's directory (the user's ruling of 2026-11-26: "maybe some commands SHOULD run on the project root for convenience", explicit twins, nothing implicit); WHY A WORD: a leader leaf names a builtin (config.leader_path, leader_args) and `:` is a normal-mode role, so the three keys need one word that reaches the root: `Root <line>` runs the line as Exec does with the step's flag Pardes.exec_root set, bare (SPC :) it opens the `:` line marked to run there, and a script's `Root make` or `Root Grep x` falls out of it at a ctl for free; THE CHANGE: builtins.Root; Pardes.exec_root, a step's own (replica `.local`, root.zig's kept_out) like exec_column; execDir reads the root under it (a command pane's directory, Term's, and Query.create's, which now calls execDir in place of its copy of it); executeFrom sends Root's line to a command pane even from a shell at its prompt, and runCommand reuses only a finished command pane at the root for it (not the asking one); Pick.root: a picker Root asked lists from the root, its head `␣ f Find root`, `Grep root`, its list word `Find root …`, Exec on that word running at the root again, a Grep's leading directory read from the root (grepScope, unchanged); Command.root: SPC :'s line, its head `: root`, `= Root make` as its plain word, its Enter and its `:open ` run as Root; config: Root's leader path `:`, leader_args fF and fG run `Root Find` and `Root Grep`, which-key labels `Find root` and `Grep root` (bindings.zig); replica's may_wait gets back a kind row, `Root *` (the root's stat on the session's disk), walked as `Root Find` (walk_samples: bare Root, the `:` line, asks the disk nothing); docs: Root's own doc (the Help index row `SPC : Root`, builtins-tui.json from `zig build builtins-json`, the same line put in builtins-gui.json), the cheatsheet's leader list (three short rows), guide.typ's Find and Grep rows and its where-commands-run table; RUN (TEST FIRST): behaviour/find_grep.zig (the reference's Find and Grep chapter, new): a `.jj` project, `x.txt` two directories below it: SPC f f lists `x.txt` alone and no `Find root`, SPC f F `␣ f Find root` with `a/b/x.txt` and `top.txt` (`.jj` passed over); SPC f G `needle` `␣ f Grep root needle` with `a/b/x.txt:1 needle below` and `top.txt:1 … needle at the top`, `a needle` the first alone (a/ is the root's); look_and_exec.zig: `:pwd` makes a command pane named `<root>/a/b`, SPC : shows `: root` and its `pwd` a second command pane named `<root>` (a `.git` project), each body `% pwd`; the three fail on zxsqtpol 8d2a064eb69a (`not on the screen: ␣ f Find root`, `… ␣ f Grep root needle`, `… : root`), pass now; test/session.zig gains `advance`, the host's clock moved on, so a typed Grep's 80 ms pause comes due in a T1 test; REAL CHECK (a private detached session of this Debug build over 9P, CA's demo copied with a `.jj` at its top): from src/torque/types.cc SPC f f types.cc types.h, SPC f F `Find root` Makefile compile_commands.json src/torque/types.cc … 1/5, SPC f G ToString `Grep root` three hits from the root, `src ToString` narrowed, `:pwd` printed …/demo/src/torque, SPC : `: root`, `: root make = Root make`, its pwd printed …/demo, its make ran `clang++ … src/torque/types.cc` at the root (exit 2, the demo's error) and SPC e from types.cc walked to types.cc:7:11, `SPC :open Make` opened `Find root Make`; GOLDENS (process-test --update, read): leader.golden spc and unmapped (`: Root` after `/ All` in SPC's level), find.golden group (`F Find root`, `G Grep root` in SPC f's), nothing else moved; NO hot path (a stat per directory up to the root once per Root run; a flag and five bytes in the head); the dump and the digest gain two bools (Pick.root, Command.root): the 40,000-seed dump fuzz (40,000 + 40,000 join seeds, 1,779 image seeds) 11/11, core/fuzz.zig restored byte for byte; GATES: Debug core-test 1172/1349 (177 skipped), shell-test 1390/1393 (3 skipped; the walk with Root's row), addons 8/8, term-test 17/17, kitty-test 45/45, process-test 0 of 149 failed (3 skipped), pane-test 184/185, behaviour-test 293/293 and --replay 293/293 (+3), consumer-test, the soak twice (rtt 30/80/207: diverged 0, unequal 0, quiet checks 617/0 485/0 568/0 and 499/0 387/0 553/0, unlisted stops 0, the corpus 22 of 22 scenes the same, no leak), daemon.py plain x3, games, window-clients, clients x5, relink, launch, pair, gui, client-motion rc 0, far rc 1 (`no link of the far client ended under the flood`, as on the base), client-resize-real skipped (no compositor), the macOS x86_64 and arm64 and FreeBSD cross-builds; ReleaseSafe: the build (0 invalid options), the soak (diverged 0, unequal 0, quiet checks 514/0 381/0 543/0, unlisted stops 0), process-test 1 of 149 failed (root-ctl Restore, as on the base), upgrade from the installed ab9fa40a7bbb, upgrade-gui, upgrade-self (65 s) and upgrade-back (40 s) each nothing left behind, launch, clients x3, far, gui, client-motion, client-resize-real, client-idle, pair, plain x3 rc 0; load 1.2 to 3.6
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'core')
| -rw-r--r-- | core/Command.zig | 20 | ||||
| -rw-r--r-- | core/Core.zig | 10 | ||||
| -rw-r--r-- | core/Pick.zig | 17 | ||||
| -rw-r--r-- | core/Prompt.zig | 2 | ||||
| -rw-r--r-- | core/Query.zig | 2 | ||||
| -rw-r--r-- | core/bindings.zig | 3 | ||||
| -rw-r--r-- | core/builtins.zig | 19 | ||||
| -rw-r--r-- | core/config.zig | 8 | ||||
| -rw-r--r-- | core/exec.zig | 9 | ||||
| -rw-r--r-- | core/normal.zig | 2 | ||||
| -rw-r--r-- | core/replica.zig | 5 | ||||
| -rw-r--r-- | core/root.zig | 2 |
12 files changed, 78 insertions, 21 deletions
diff --git a/core/Command.zig b/core/Command.zig index bb42bbbd..ce4dd132 100644 --- a/core/Command.zig +++ b/core/Command.zig @@ -19,7 +19,9 @@ //! pipes typed last. Enter runs the line as B2 runs a word: a command as //! its pardes word (`:theme`'s the theme the window wears), anything else //! Exec'd. `:` on the empty field gives the keyboard to the tag's own text, -//! as `:` did before there was a field; `:` there gives it back. +//! as `:` did before there was a field; `:` there gives it back. `SPC :` +//! (Root bare) is its twin at the project's root: Enter runs the line as +//! Root, head `: root`. //! //! A view's own, as its prompt is (TagState.prompt.command): which rows //! the hits (TagState.hits) are of, and where in the field Tab writes. @@ -69,6 +71,9 @@ from: u16 = 0, /// Tab (or a click) wrote the current row into the field: the rows are /// the line's from before it, which Tab steps on through. completed: bool = false, +/// `SPC :` (Root bare): the line runs at the project's root, its head +/// `: root`. +root: bool = false, /// A command typed after `:`, its short name, what it takes, and what it /// does: the pardes word it is. @@ -97,10 +102,12 @@ const row_max = 96; /// A doc's rows, the fewest the names' band has. const doc_rows = 4; -/// `:` in pane `pane`'s body: the field empty in its tag, every row. -pub fn open(p: *Pardes, pane: *Pane) void { +/// `:` in pane `pane`'s body: the field empty in its tag, every row; its +/// line run by Root, at the project's root, when `root`. +pub fn open(p: *Pardes, pane: *Pane, root: bool) void { Prompt.open(p, pane, .command); if (p.view().tag_state.kind != .prompt) return; + p.view().tag_state.prompt.command.root = root; filter(p, pane); } @@ -166,8 +173,9 @@ pub fn filter(p: *Pardes, pane: *Pane) void { var buf: [Field.max + 8]u8 = undefined; const word = std.fmt.bufPrint(&buf, "Find {s}", .{arg}) catch return; const id = TagState.hostOf(p) orelse return; + const root = c.root; TagState.toRest(p); - return exec.runBuiltin(p, config.exec_cmd, id, "", word); + return exec.runBuiltin(p, if (root) .Root else config.exec_cmd, id, "", word); } c.rows = typed[i].rows; c.from = @intCast(l.name.len + 1); @@ -508,13 +516,14 @@ fn run(p: *Pardes, id: usize, pane: *Pane) void { // What it runs, read while the rows are there (the theme worn). var buf: [Field.max + 16]u8 = undefined; const r = plan(p, line, &buf); + const root = s.prompt.command.root; TagState.toRest(p); if (std.mem.trim(u8, line, " ").len == 0) return; p.prompt_history.command.add(line); p.registers.put(p.gpa, ':', line, 0, 1, true) catch |err| return p.reportError(.at(id), "command", err); if (r.said) |why| return p.setMessage(.at(id), why); switch (r.verb) { - .exec => exec.runBuiltin(p, config.exec_cmd, id, "", r.word), + .exec => exec.runBuiltin(p, if (root) .Root else config.exec_cmd, id, "", r.word), .look => exec.runBuiltin(p, config.look_cmd, id, "", r.word), .pipe => { const f = pane.file orelse return p.setMessage(.at(id), "only a file's text is piped"); @@ -537,6 +546,7 @@ pub fn plainWord(p: *Pardes, w: *std.Io.Writer, line: []const u8) ?[]const u8 { .look => w.writeAll(r.word) catch return null, .pipe => w.print("Edit |{s}", .{r.word}) catch return null, } + if (r.verb == .exec and p.view().tag_state.prompt.command.root) return "Root"; return if (r.verb == .look) "Look" else "Exec"; } diff --git a/core/Core.zig b/core/Core.zig index 0b602ba2..84a58427 100644 --- a/core/Core.zig +++ b/core/Core.zig @@ -326,6 +326,9 @@ word_look: bool = false, /// have no directory of their own: it runs in the session's /// (`sessionDir`), as acme's row and column tags do. exec_header: bool = false, +/// The running word is Root's (`SPC :`, `SPC f F`, `SPC f G`): it runs at +/// the project's root above its directory (execDir, Pick.open). +exec_root: bool = false, session_dir: [limits.host_path_cap]u8 = undefined, /// A spawn's directory too long for the effect's inline buffer, by pane /// slot: the effect then carries none, and perform gives the host this. @@ -539,6 +542,7 @@ pub const replica = .{ // `init` makes them between any two steps. "multi_first", "multi_stop", "multi_index", "multi_count", "exec_depth", "exec_column", + "exec_root", // How this process was started, and the last dump it made for // its host to write: a session loaded elsewhere has its own. "opts", "dump_out", "dump_export", @@ -1902,10 +1906,10 @@ fn processDir(buf: *[limits.host_path_cap]u8) ?[]const u8 { } /// The directory a word run from pane `id`'s text or tag runs in, or, -/// from a header, the session's. +/// from a header, the session's; Root's, the project's root above it. pub fn execDir(p: *Pardes, id: usize) []const u8 { - if (p.exec_header) return p.sessionDir(); - return paneDir(p.panes[id] orelse return p.sessionDir()); + const dir = if (p.exec_header or p.panes[id] == null) p.sessionDir() else paneDir(p.panes[id].?); + return if (p.exec_root) pardes.Pick.workTree(p, dir) else dir; } pub const SavePath = Effect.Buf(effect_path_cap); diff --git a/core/Pick.zig b/core/Pick.zig index 5499809a..09ecb521 100644 --- a/core/Pick.zig +++ b/core/Pick.zig @@ -94,6 +94,9 @@ word: Kind.Buf(24) = .{}, keys: Kind.Buf(4) = .{}, /// Where Find and Grep look; what the rows' paths are relative to. dir: Kind.Buf(4096) = .{}, +/// Asked by Root (`SPC f F`, `SPC f G`): `dir` is the project's root above +/// the asking pane's, and its head and list word say `root`. +root: bool = false, /// The pane that asked, under whose tag it hangs, and the one its Enter /// lands in, whose body previews, by serial. owner: u32 = 0, @@ -255,7 +258,9 @@ pub fn open(p: *Pardes, from: usize, source: Source, word: []const u8, query: [] const pk = make(p, source) catch |err| return p.reportError(.at(from), "pick", err); pk.word.set(if (word.len > 0) word else words.get(source).word); pk.keys.set(words.get(source).keys); - pk.dir.set(Pardes.paneDir(asker)); + // Root's (`SPC f F`): from the project's root above the asking pane's. + pk.root = p.exec_root; + pk.dir.set(if (pk.root) workTree(p, Pardes.paneDir(asker)) else Pardes.paneDir(asker)); pk.rows = p.gpa.dupe(u8, rows) catch |err| return p.reportError(.at(from), "pick", err); pk.cap = p.view().rects[from].h * 2 / 5; hostIn(p, pk, from) catch |err| return p.reportError(.at(from), "pick", err); @@ -268,8 +273,8 @@ pub fn open(p: *Pardes, from: usize, source: Source, word: []const u8, query: [] /// The work tree `dir` is in: the nearest directory at or above it that /// holds a `.jj` or a `.git` (a git worktree's is a file); `dir` itself -/// when none does. -fn workTree(p: *Pardes, dir: []const u8) []const u8 { +/// when none does. Root's words run there (Pardes.execDir, `open`). +pub fn workTree(p: *Pardes, dir: []const u8) []const u8 { var d = dir; while (true) { var buf: [4096]u8 = undefined; @@ -838,6 +843,7 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head { // One Resume opened: where it stands among the kept (UX L'2). if (p.resume_at != 0) try text.print(arena, "Resume {d}/{d} ", .{ p.resume_at, nkept(p) }); try text.appendSlice(arena, pk.word.slice()); + if (pk.root) try text.appendSlice(arena, " root"); try text.append(arena, ' '); for (pk.refined[0..pk.nrefined]) |r| try text.print(arena, "{s} | ", .{r.query.slice()}); if (pk.spine == .edit) try text.print(arena, "{s} | Edit ", .{pk.query.slice()}); @@ -1784,6 +1790,7 @@ fn land(p: *Pardes, wanted: How) void { fn wordOf(p: *const Pardes, pk: *const Pick, buf: *Kind.Buf(Trail.max_text)) []const u8 { var w: std.Io.Writer = .fixed(&buf.bytes); w.writeAll(pk.word.slice()) catch {}; + if (pk.root) w.writeAll(" root") catch {}; for (pk.refined[0..pk.nrefined]) |r| w.print(" {s} |", .{r.query.slice()}) catch {}; if (pk.query.len > 0) w.print(" {s}", .{pk.query.slice()}) catch {}; const n = count(p, pk); @@ -1889,6 +1896,10 @@ pub fn rerun(p: *Pardes, id: usize, index: u32) void { const pk = byId(p, index) orelse return p.setMessage(.at(id), "walk: that list is gone: the last 8 are kept"); var query: Kind.Buf(256) = .{}; query.set(pk.query.slice()); + // One Root asked runs at the root again. + const was = p.exec_root; + p.exec_root = was or pk.root; + defer p.exec_root = was; open(p, id, pk.source, pk.word.slice(), query.slice(), pk.rows); } diff --git a/core/Prompt.zig b/core/Prompt.zig index d5f9a374..0b74ee68 100644 --- a/core/Prompt.zig +++ b/core/Prompt.zig @@ -1109,6 +1109,8 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !TagState.Head { const text = &b.text; const spans = &b.spans; try styled(arena, text, spans, info.get(pr.op).cell, .key); + // `SPC :`'s line runs at the project's root (Root): its scope named. + if (pr.op == .command and pr.command.root) try text.appendSlice(arena, " root"); try text.append(arena, ' '); const caret: u32 = @intCast(text.items.len + s.field.caret); const line = s.field.text(); diff --git a/core/Query.zig b/core/Query.zig index 96047ca1..d2c663ed 100644 --- a/core/Query.zig +++ b/core/Query.zig @@ -289,7 +289,7 @@ fn create(p: *Pardes, owner_id: usize, line: []const u8, source: Source) ?usize p.reportError(.at(owner_id), "search", error.NoPaneSlots); return null; }; - const dir = if (p.exec_header) p.sessionDir() else Pardes.paneDir(owner); + const dir = p.execDir(owner_id); const content = std.mem.concat(p.gpa, u8, &.{ line, "\n" }) catch return null; const np = Output.open(p, free, dir, .search, "", content) catch |err| { p.gpa.free(content); diff --git a/core/bindings.zig b/core/bindings.zig index 6128e311..e59f0f4a 100644 --- a/core/bindings.zig +++ b/core/bindings.zig @@ -149,7 +149,8 @@ fn leaderLevel(comptime prefix: []const u8) []const Node { const path = config.leader_path.get(b) orelse continue; if (std.mem.eql(u8, path, here)) break .{ .key = k, .label = @tagName(b), .leaf = .{ .builtin = b }, .lsp = lsp }; } else for (config.leader_args, 0..) |la, a| { - if (std.mem.eql(u8, la.path, here)) break .{ .key = k, .label = la.arg, .leaf = .{ .arg = a }, .lsp = lsp }; + // Root's twins say their scope, as their heads do: `Find root`. + if (std.mem.eql(u8, la.path, here)) break .{ .key = k, .label = if (la.cmd == .Root) la.arg ++ " root" else la.arg, .leaf = .{ .arg = a }, .lsp = lsp }; } else .{ .key = k, .label = groupLabel(here), .children = leaderLevel(here), .group = groupIndex(here) }; } return sorted(&nodes); diff --git a/core/builtins.zig b/core/builtins.zig index 62e53eaf..e5421cd4 100644 --- a/core/builtins.zig +++ b/core/builtins.zig @@ -414,6 +414,25 @@ pub const Exec = struct { } }; +/// Run its argument as Exec does, at the project's root. +/// +/// The root is the nearest directory at or above this pane's holding a +/// `.jj` or a `.git`, else this pane's own. `Root make` runs make there in a +/// command pane; `Root Find` and `Root Grep` (`SPC f F`, `SPC f G`) search +/// from there, their heads `Find root` and `Grep root`, a Grep's leading +/// directory read from the root. Bare (`SPC :`), the `:` line, its head +/// `: root`, whose Enter runs the line there. +pub const Root = struct { + pub const takes_arg = true; + pub fn run(c: Ctx) void { + const line = std.mem.trim(u8, c.arg orelse "", " \t\r\n"); + if (line.len == 0) return @import("Command.zig").open(c.p, c.pane, true); + c.p.exec_root = true; + defer c.p.exec_root = false; + _ = exec.executeFrom(c.p, c.id, line, c.from_body); + } +}; + // ---- session ---- /// Which panes a refusal asks about: every one (Exit, Restore), one (Del), diff --git a/core/config.zig b/core/config.zig index d500cdcb..69636d1d 100644 --- a/core/config.zig +++ b/core/config.zig @@ -28,11 +28,15 @@ const undecided: []const u8 = "<undecided>"; /// Leader paths that run a builtin WITH an argument (the pick prototype's): /// the query pane's sources that have no word of their own, `Search` and /// line 1. `SPC s` is the session group (Dump, Restore, Attach), so the -/// declarations are `SPC s s`, a key from helix's. +/// declarations are `SPC s s`, a key from helix's. Find's and Grep's twins +/// at the project's root (Root, the user's explicit root keys) are their +/// keys' capitals. pub const leader_args = [_]struct { path: []const u8, cmd: Builtin, arg: []const u8 }{ .{ .path = "bb", .cmd = .Search, .arg = "Panes" }, .{ .path = "ss", .cmd = .Search, .arg = "Symbols" }, .{ .path = "/", .cmd = .Search, .arg = "All" }, + .{ .path = "fF", .cmd = .Root, .arg = "Find" }, + .{ .path = "fG", .cmd = .Root, .arg = "Grep" }, }; comptime { @@ -155,6 +159,8 @@ pub const leader_path = paths: { .Look = null, .Mini = null, .Exec = null, + // `:`'s twin, its line run at the project's root. + .Root = ":", }); if (builtins.capabilities.font_picker) { table.set(.Fonts, "tf"); diff --git a/core/exec.zig b/core/exec.zig index 611e3430..fd2c6b1c 100644 --- a/core/exec.zig +++ b/core/exec.zig @@ -695,8 +695,8 @@ pub fn executeFrom(p: *Pardes, id: usize, txt: []const u8, from_body: bool) ?usi } // A command from a column's or the workspace's tag is that tag's: a // command pane in the session's directory, never typed into whichever - // terminal has the keyboard. - if (p.exec_header or !takesCommandLine(p, id)) return runCommand(p, id, cmd); + // terminal has the keyboard; Root's, one at the project's root. + if (p.exec_header or p.exec_root or !takesCommandLine(p, id)) return runCommand(p, id, cmd); // At a prompt with typed text below it: the output area padded with // newlines so the command's output does not overwrite the buffer. if (pane.ovl) |o| if (pane.isTerminal()) if (pane.terminal) |state| if (panes.Term.prompt(state).at_prompt) { @@ -741,11 +741,12 @@ pub fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize { // Not one whose pty a job it left behind still prints to: reusing it // would hang that job up. // From a column's tag, only a finished pane in that column is reused, - // as the new one goes in that column (layout.placeNew). + // as the new one goes in that column (layout.placeNew); Root's line, + // only one at the root. // Nor one leased: an open that was answered its serial and is still // open reads that pane's output, which another client's command must // not replace; a new pane runs it instead. - const reuse: ?usize = if (!p.exec_header and p.exec_column == null and src != null and src.?.command != null and src.?.command_done and !src.?.command_pty and !leased(p, src.?.serial)) from else for (p.panes, 0..) |slot, i| { + const reuse: ?usize = if (!p.exec_header and !p.exec_root and p.exec_column == null and src != null and src.?.command != null and src.?.command_done and !src.?.command_pty and !leased(p, src.?.serial)) from else for (p.panes, 0..) |slot, i| { const other = slot orelse continue; if (p.exec_column) |c| if (if (layout.findPane(p, i)) |f| f.col != c else true) continue; if (other.command != null and other.command_done and !other.command_pty and std.mem.eql(u8, other.cwdSlice(), dir) and !leased(p, other.serial)) break i; diff --git a/core/normal.zig b/core/normal.zig index e6d6dbb0..813b553a 100644 --- a/core/normal.zig +++ b/core/normal.zig @@ -1398,7 +1398,7 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) edit.Error! .command_line => switch (t.what) { .tag => pane.focus = .body, .column, .workspace => tagline.exitHeader(p), - .body => Command.open(p, pane), + .body => Command.open(p, pane, false), .input => tagline.enterTag(p, pane), }, inline .pipe_selection, .pipe_selection_to, .insert_output, .append_output, .keep_pipe => |role| { diff --git a/core/replica.zig b/core/replica.zig index 172ab6f3..546ed679 100644 --- a/core/replica.zig +++ b/core/replica.zig @@ -7352,6 +7352,7 @@ const may_wait = [_]Wait{ .{ .what = "Save", .on = .any, .stop = "write_file", .why = "a save" }, // A program run, a shell opened or closed: the session's processes. .{ .what = "Exec *", .on = .any, .stop = "kind", .why = "a program run: its name asked of the disk first" }, + .{ .what = "Root *", .on = .any, .stop = "kind", .why = "the project's root, a `.jj` or `.git` at or above the pane's directory asked of the session's disk (Pick.workTree), as Find's listing and a program run are the session's (SPC f F, SPC f G, SPC :'s line)" }, .{ .what = "Exec *", .on = .any, .stop = "tty_taken", .why = "a program run in a shell: whether one has it, the session's" }, .{ .what = "Exec *", .on = .command, .stop = "run a command", .why = "a line run again in its directory's finished command pane: its process and its emulator are the session's" }, .{ .what = "Term", .on = .any, .stop = "kind", .why = "a shell opened: its name asked of the disk first" }, @@ -7441,13 +7442,15 @@ const walk_prefixes = prefixes: { break :prefixes ks; }; -/// The argument a word that means nothing without one is walked with. +/// The argument a word that means nothing without one is walked with, and +/// Root's, whose bare `:` line asks the disk nothing. const walk_samples = [_]struct { []const u8, []const u8 }{ .{ "Look", "mise.toml" }, .{ "Exec", "echo" }, .{ "Mount", "x" }, .{ "Unmount", "x" }, .{ "Msg", "hi" }, .{ "ThemeFile", "t.zon" }, .{ "Edit", "s/a/b/" }, .{ "Mini", "x" }, .{ "Find", "x" }, .{ "Grep", "x" }, .{ "Rename", "x" }, .{ "WsSymbols", "x" }, .{ "Theme", "acme" }, .{ "Font", "Mono 12" }, .{ "TaglineSize", "100" }, .{ "WindowOpacity", "100" }, .{ "MessageLinger", "1000" }, .{ "InactiveDim", "0" }, .{ "GripWidth", "100" }, .{ "At", "@-" }, + .{ "Root", "Find" }, }; fn keyName(buf: []u8, k: pardes.Key) []const u8 { diff --git a/core/root.zig b/core/root.zig index 14f9fede..98445d38 100644 --- a/core/root.zig +++ b/core/root.zig @@ -789,7 +789,7 @@ const kept_out = [_]struct { []const u8, []const u8, []const u8 }{ .{ "Core.zig", "diff_output locations_cache tty_filter_palette", "caches of pure functions of their key (a text, a theme): a step finds what it would make; a query row's colours from them are out of its digest (locations.Row.digest), and what a step asks a worker to paint is never decided by them (Stream.paintRows)" }, .{ "Core.zig", "retired_panes", "panes torn down this step, freed at its end" }, .{ "Core.zig", "theme_preview preview_chrome", "a themes picker's preview (colors.previewTheme): made from the live picker's cursor, in the digest with it, after every step (Pick.produceAll) and gone at its roll-up; a step reading a theme meanwhile reads the one its own state previews" }, - .{ "Core.zig", "multi_first multi_stop multi_index multi_count exec_depth exec_column", "a step's own: set by a key's replay across the ranges (normal.replaySels) and a word's run (exec.zig), each put back before the step ends; between steps what `init` makes, so a load takes them as it makes them (a dump's said 2^30 ranges once: a yank sized its register by it)" }, + .{ "Core.zig", "multi_first multi_stop multi_index multi_count exec_depth exec_column exec_root", "a step's own: set by a key's replay across the ranges (normal.replaySels) and a word's run (exec.zig), each put back before the step ends; between steps what `init` makes, so a load takes them as it makes them (a dump's said 2^30 ranges once: a yank sized its register by it)" }, .{ "Core.zig", "rects col_x col_w", "a view's geometry: the layout pass's (layout.compute) over its columns and screen, at every sync and resize, and at a load (dump.afterLoad); never read before it" }, .{ "Core.zig", "distrusted frames tape", "Options: the client's own list, its runner's statistics, its tape" }, .{ "Event.zig", "native_image_patches", "what this process's shell can take" }, |
