From 3176ef86d93fa838a5ce443388de22decca904a9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 21 Jan 2024 20:50:18 -0800 Subject: [PATCH] cli: remove list-keybinds changes --- src/cli/list_keybinds.zig | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/cli/list_keybinds.zig b/src/cli/list_keybinds.zig index a17f23504..1f5f4aa1f 100644 --- a/src/cli/list_keybinds.zig +++ b/src/cli/list_keybinds.zig @@ -1,20 +1,16 @@ const std = @import("std"); const args = @import("args.zig"); const Action = @import("action.zig").Action; -const KeybindAction = @import("../input/Binding.zig").Action; const Arena = std.heap.ArenaAllocator; const Allocator = std.mem.Allocator; const configpkg = @import("../config.zig"); const Config = configpkg.Config; -const help_strings = @import("help_strings"); pub const Options = struct { /// If true, print out the default keybinds instead of the ones /// configured in the config file. default: bool = false, - docs: bool = false, - pub fn deinit(self: Options) void { _ = self; } @@ -50,24 +46,6 @@ pub fn run(alloc: Allocator) !u8 { defer config.deinit(); const stdout = std.io.getStdOut().writer(); - if (opts.docs) { - const info = @typeInfo(KeybindAction); - var first = true; - inline for (info.Union.fields) |field| { - if (field.name[0] == '_') continue; - if (@hasDecl(help_strings.KeybindAction, field.name)) { - if (!first) try stdout.print("#\n", .{}); - try stdout.print("# {s}\n", .{field.name}); - const help = @field(help_strings.KeybindAction, field.name); - var lines = std.mem.splitScalar(u8, help, '\n'); - while (lines.next()) |line| { - try stdout.print("# {s}\n", .{line}); - } - first = false; - } - } - } - try config.keybind.formatEntry(configpkg.entryFormatter("keybind", stdout)); return 0;