cli: support --help and -h for actions

This commit is contained in:
Mitchell Hashimoto
2024-01-20 09:29:26 -08:00
parent 203b38fdac
commit b438998fb8
7 changed files with 97 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
const std = @import("std");
const inputpkg = @import("../input.zig");
const args = @import("args.zig");
const Action = @import("action.zig").Action;
const Arena = std.heap.ArenaAllocator;
const Allocator = std.mem.Allocator;
const Config = @import("../config/Config.zig");
@@ -13,6 +14,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 "list-keybinds" command is used to list all the available keybinds