cli/show-config: enable --help

This commit is contained in:
Mitchell Hashimoto
2024-01-20 19:44:54 -08:00
parent ddd17eda06
commit 27453b64e6

View File

@ -1,6 +1,7 @@
const std = @import("std"); const std = @import("std");
const args = @import("args.zig"); const args = @import("args.zig");
const Allocator = std.mem.Allocator; const Allocator = std.mem.Allocator;
const Action = @import("action.zig").Action;
const configpkg = @import("../config.zig"); const configpkg = @import("../config.zig");
const Config = configpkg.Config; const Config = configpkg.Config;
@ -19,6 +20,12 @@ pub const Options = struct {
pub fn deinit(self: Options) void { pub fn deinit(self: Options) void {
_ = self; _ = 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 /// The "show-config" command shows the current configuration in a valid