diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2024-08-31 10:39:01 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2024-08-31 10:39:22 -0700 |
| commit | f1aea10a84176ff4338f7d2f0bf1b9c700b41baa (patch) | |
| tree | 9331b7358ee3788ccd728601a2ee822fdb272236 /src/cli/version.zig | |
| parent | f7d1fb8ba0a78d9bf77b8a8263b4031d4d90cd3a (diff) | |
cli/version: don't parse any args
Fixes #2166
Diffstat (limited to 'src/cli/version.zig')
| -rw-r--r-- | src/cli/version.zig | 23 |
1 files changed, 1 insertions, 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}); |
