summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 19:14:11 -0300
committerGabriel Schneider <[email protected]>2026-11-06 20:00:43 -0300
commitb22fa2638bca470bbd8c5ea4768eb0eaaa3e8195 (patch)
tree08d0cc564bfe03861313f0acbf14f91f8dc94cc7 /src/builtins.zig
parent2ddd5bcbe8d470c00b045af5822418fe429357bc (diff)
downloadpardes-b22fa2638bca470bbd8c5ea4768eb0eaaa3e8195.tar.gz
pardes-b22fa2638bca470bbd8c5ea4768eb0eaaa3e8195.zip
Build: a word that prints this build into a +Build pane (SPC h b): the version line, the commit, the jj change and the build time (stamped as the commit is: release builds and the ~/.local install, else "not stamped"), the zig that built it, its mode, target, platform and grammars, whether the addons are compiled in, the wire's semantics hash and the dependencies; build.zig stamps the change (jj log -r git_head()) and the time (date -u) through one command helper beside gitCommit; a T1 case reads the pane
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/builtins.zig b/src/builtins.zig
index 4712a67a..15319d6e 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -108,7 +108,6 @@ fn isEnabled(comptime T: type) bool {
return !@hasDecl(T, "enabled") or T.enabled;
}
-
/// Why `word`, a builtin some build has, is none in this one: `GUI-only`
/// for the GUI's own (`gui_only`), else `not in this build`; null for a
/// word that is one here, or in no build.
@@ -1618,6 +1617,18 @@ pub const Messages = struct {
}
};
+/// This build: its version, commit, jj change and build time (a stamped
+/// build's: a release or the ~/.local install), the zig that built it, its
+/// optimize mode, target, platform, grammars, whether the addons are compiled
+/// in, and its dependencies, printed into an output buffer.
+pub const Build = struct {
+ pub const scope: Scope = .session;
+ pub const output: OutputTraits = .{ .name = config.build_buffer };
+ pub fn run(c: Ctx) void {
+ panes.Output.openBuild(c.p, c.id) catch |err| c.p.reportError(c.id, "build", err);
+ }
+};
+
/// This build's version and what changed to reach it, printed into an output
/// buffer the same way Config prints the live settings.
pub const Changelog = struct {