summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-22 09:50:43 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:24 -0300
commita8b457a306a4442975210bcac3f04b56513c61c3 (patch)
tree6e2026ecb15da2fb919a0202f5d8b38e3b36a595 /src/main.zig
parenta8a1499bdffffc5b6919e24ec957e92fabaf003b (diff)
parent7e9d2c4169245072265b483ffaa6aa05f23f08d3 (diff)
downloadpardes-a8b457a306a4442975210bcac3f04b56513c61c3.tar.gz
pardes-a8b457a306a4442975210bcac3f04b56513c61c3.zip
Merge: Def/Refs, the diff viewer, Helix n/N, Callstack, Zig 0.17, Window mode and the terminal cwd fix onto 0.24
The docs keep both sides: 0.24's Ctrl-i fallbacks and typed ls with this line's Window mode, raw Esc and Helix n/N wording. The CHANGELOG's unreleased entries go above 0.24, Def/Refs and the context rows among them. cheatsheet-a4.pdf rendered again; .scratch/ ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index ed70b624..64614daa 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -102,7 +102,7 @@ const help_text =
;
/// `pardes -` inside a session: `text`, stdin as it came, escapes and all,
-/// into the directory's one +Pager (/pager, refilled when it is there):
+/// into a new +Pager of the directory (/pager):
/// written after the directory on that one open, the session parses it
/// (pager.zig) and puts it in as one undo step, left clean. A text the
/// session would not take is never lost: it goes to stderr, a terminal,
@@ -464,6 +464,12 @@ fn nativeMain(init: std.process.Init) !void {
}
opts.tty_only = explicit_tty or session_only;
opts.mounts = mounts[0..mounts_len];
+ // `zig build run-isolated` with nothing named: something to look at on
+ // arrival, read out of the binary itself.
+ if (pardes.isolated and positional == null) {
+ session_only = false;
+ positional = "src/pardes.zig";
+ }
if (detach != null and attach != null)
badArgs(init.io, "--detach and --attach are opposites: one runs the session, the other joins one", .{});
// --wait waits on the pane a FILE opens: with none there is nothing to
@@ -493,7 +499,7 @@ fn nativeMain(init: std.process.Init) !void {
if (!outside) {
const owner = std.mem.span(std.c.getenv("PARDES_PID") orelse break :forwarding);
const pid = std.fmt.parseInt(std.c.pid_t, owner, 10) catch break :forwarding;
- if (pid <= 0 or std.c.kill(pid, @enumFromInt(0)) != 0) break :forwarding;
+ if (pid <= 0 or std.c.kill(pid, @fromBackingInt(@intCast(0))) != 0) break :forwarding;
}
// Can I reach it? That is the other two, and it is a separate answer.