From f1aea10a84176ff4338f7d2f0bf1b9c700b41baa Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 31 Aug 2024 10:39:01 -0700 Subject: [PATCH] cli/version: don't parse any args Fixes #2166 --- src/cli/version.zig | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/cli/version.zig b/src/cli/version.zig index fc23fae2a..1366c99c8 100644 --- a/src/cli/version.zig +++ b/src/cli/version.zig @@ -4,31 +4,10 @@ const builtin = @import("builtin"); const build_config = @import("../build_config.zig"); const xev = @import("xev"); const renderer = @import("../renderer.zig"); -const args = @import("args.zig"); -const Action = @import("action.zig").Action; - -pub const Options = struct { - pub fn deinit(self: Options) void { - _ = self; - } - - /// Enables `-h` and `--help` to work. - pub fn help(self: Options) !void { - _ = self; - return Action.help_error; - } -}; /// The `version` command is used to display information about Ghostty. pub fn run(alloc: Allocator) !u8 { - var opts: Options = .{}; - defer opts.deinit(); - - { - var iter = try std.process.argsWithAllocator(alloc); - defer iter.deinit(); - try args.parse(Options, alloc, &opts, &iter); - } + _ = alloc; const stdout = std.io.getStdOut().writer(); try stdout.print("Ghostty {s}\n\n", .{build_config.version_string});