diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-02 18:17:37 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-10 09:17:07 -0300 |
| commit | 35cecf26b06cf50d9827056da99d883ca975c39b (patch) | |
| tree | 7b228b94313880f2d78fa5f0fb85a0115cfd0e88 /src/main.zig | |
| parent | 4f980de2c7a2ec29c561bca815c37879a18cc2b3 (diff) | |
| download | pardes-35cecf26b06cf50d9827056da99d883ca975c39b.tar.gz pardes-35cecf26b06cf50d9827056da99d883ca975c39b.zip | |
load builtin commands from the user config before rendering
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index 9822ea3c..abf9b22d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -152,6 +152,10 @@ fn nativeMain(init: std.process.Init) !void { return error.BadArgs; } } + // Native shells opt into the user config; the sans-IO core and web keep + // Options' null default. Read it before entering either frontend so every + // builtin has run before that frontend can render its first frame. + opts.startup_config = @import("user_config.zig").load(init.io, arena, init.environ_map); switch (pardes.platform) { .tty => try @import("tty/tty.zig").run(init, opts), .gui => try @import("gui/gui.zig").run(init, opts), @@ -181,6 +185,7 @@ fn parseCtrlKey(raw: []const u8) ?u21 { // file's tests and no further: fonts.zig is imported by both gui.zig and // builtins.zig and still needs its own line here. test { + _ = @import("user_config.zig"); if (comptime pardes.platform == .gui) { _ = @import("gui/gui.zig"); _ = @import("gui/fonts.zig"); |
