summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-06 20:36:38 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commitd0ba070a87c54c538e5f788485391b0af927d0fb (patch)
tree46dc05d158457b48a9e9b4f2b1fbc07c59e161b0 /src/main.zig
parent0485446709e6190ff54264cd0e376fc8b47e3d64 (diff)
downloadpardes-d0ba070a87c54c538e5f788485391b0af927d0fb.tar.gz
pardes-d0ba070a87c54c538e5f788485391b0af927d0fb.zip
boot with a single shell pane (was three). Options.shells (default 1; >=3 gives the classic two-column boot), -n <count> CLI flag. The 26 legacy snap scripts pin -n 3 on their start line so their coordinates and goldens stay valid; boot.snap tests the new default (golden regenerated: one full-width pane). 28/28 green.
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig
index 9a8cd6da..56d04669 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -33,6 +33,7 @@ const help_text =
\\
\\Options:
\\ --tty start as one shell pane already in tty mode
+ \\ -n <count> initial shell panes: 1 (default) or 3 (classic)
\\ --tty-toggle <key> use Ctrl-<key> to enter/leave tty mode
\\ -l <dump.zon> load a dump of another instance (see Dump)
\\ -h, --help show this help and exit
@@ -78,6 +79,10 @@ fn nativeMain(init: std.process.Init) !void {
i += 1;
if (i >= args.len) return error.BadArgs;
opts.tty_toggle = parseCtrlKey(args[i]) orelse return error.BadArgs;
+ } else if (std.mem.eql(u8, a, "-n")) {
+ i += 1;
+ if (i >= args.len) return error.BadArgs;
+ opts.shells = std.fmt.parseInt(u8, args[i], 10) catch return error.BadArgs;
} else if (std.mem.eql(u8, a, "-l")) {
i += 1;
if (i >= args.len) return error.BadArgs;