From 27453b64e676ee609d65fd9c4f4f43102c5f4166 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 20 Jan 2024 19:44:54 -0800 Subject: [PATCH] cli/show-config: enable --help --- src/cli/show_config.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cli/show_config.zig b/src/cli/show_config.zig index fffd276d5..c62dfe9f5 100644 --- a/src/cli/show_config.zig +++ b/src/cli/show_config.zig @@ -1,6 +1,7 @@ const std = @import("std"); const args = @import("args.zig"); const Allocator = std.mem.Allocator; +const Action = @import("action.zig").Action; const configpkg = @import("../config.zig"); const Config = configpkg.Config; @@ -19,6 +20,12 @@ 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 "show-config" command shows the current configuration in a valid