cli: +list-themes

This commit is contained in:
Mitchell Hashimoto
2023-11-22 21:50:16 -08:00
parent 84e71c8c1f
commit f25a136ea5
3 changed files with 81 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ const Allocator = std.mem.Allocator;
const list_fonts = @import("list_fonts.zig");
const version = @import("version.zig");
const list_keybinds = @import("list_keybinds.zig");
const list_themes = @import("list_themes.zig");
/// Special commands that can be invoked via CLI flags. These are all
/// invoked by using `+<action>` as a CLI flag. The only exception is
@@ -18,6 +19,9 @@ pub const Action = enum {
/// List available keybinds
@"list-keybinds",
/// List available themes
@"list-themes",
pub const Error = error{
/// Multiple actions were detected. You can specify at most one
/// action on the CLI otherwise the behavior desired is ambiguous.
@@ -57,6 +61,7 @@ pub const Action = enum {
.version => try version.run(),
.@"list-fonts" => try list_fonts.run(alloc),
.@"list-keybinds" => try list_keybinds.run(alloc),
.@"list-themes" => try list_themes.run(alloc),
};
}
};