diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index ba80ee22..2ea52e15 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -3022,6 +3022,13 @@ pub const Event = union(enum) { /// nothing in the core waits for it. file_changed: struct { pane: u8, bytes: []const u8 }, paste: []const u8, + /// One builtin command line, handed to the shell by a pardes launched + /// INSIDE this one (see nested.zig) — `Look /abs/path` and nothing else + /// today. Borrowed for this call exactly like `output` bytes. It comes in + /// as an EVENT rather than a direct executeBuiltinLine call so it gets the + /// trailing sync and the ordinary effect drain: `Look` on a directory + /// emits a `.spawn` the shell has to perform. + command: []const u8, /// Native shells may preserve sub-cell wheel distance in physical pixels. /// TTY button events still enter through the ordinary mouse path. pdf_scroll: struct { pane: u8, delta_pixels: f32 }, @@ -4016,6 +4023,11 @@ pub const Options = struct { tty_toggle: u21 = config.tty_toggle_default, /// load a dump of another instance instead of spawning shells (acme -l) load_path: ?[]const u8 = null, + /// `--nested`: run a full session even inside another pardes. The core + /// never reads it; it rides here because it is the shells that would + /// otherwise open the nested.zig socket, and this is the way argv already + /// reaches them. + nested: bool = false, /// Native main fills this with the contents of the per-user config file. /// Keeping discovery out of the core makes constructors and web builds /// deterministic; when present, each line is dispatched as a builtin @@ -4601,6 +4613,7 @@ pub const Pardes = struct { p.setYank(bytes); if (p.panes[p.active]) |pane| p.normalPaste(pane, false); }, + .command => |line| _ = p.executeBuiltinLine(p.active, line), .pinch => |scale| p.ov_pinch_scale = scale, .touch_scroll => |delta| p.ov_touch_scroll_delta = delta, .tick => p.chrome_animation.advance(), |
