Generate help strings from doc comments

Doc strings attached to fields of the Config struct and doc strings
attached to the run function of actions will be used to generate Zig
code that makes those doc strings available to be used at runtime.

Based on PR #853 by @Raiden1411
This commit is contained in:
Jeffrey C. Ollie
2024-01-16 10:00:36 -06:00
committed by Mitchell Hashimoto
parent eff62fa915
commit f9ac37cdf7
3 changed files with 202 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ const build_config = @import("../build_config.zig");
const xev = @import("xev");
const renderer = @import("../renderer.zig");
/// The `version` command is used to display information
/// about Ghostty.
pub fn run() !u8 {
const stdout = std.io.getStdOut().writer();
try stdout.print("Ghostty {s}\n\n", .{build_config.version_string});