···6363Command mode:
6464<Up> / <Down> :Cycle previous commands.
6565:q :Exit.
6666+:h :View available keybinds. 'q' to return to app.
6667:config :Navigate to config directory if it exists.
6768:trash :Navigate to trash directory if it exists.
6869:empty_trash :Empty trash if it exists. This action cannot be undone.
+49
src/app.zig
···1414const EventHandlers = @import("./event_handlers.zig");
1515const CommandHistory = @import("./commands.zig").CommandHistory;
16161717+const help_menu_items = [_][]const u8{
1818+ "Global:",
1919+ "<CTRL-c> :Exit.",
2020+ "<CTRL-r> :Reload config.",
2121+ "",
2222+ "Normal mode:",
2323+ "j / <Down> :Go down.",
2424+ "k / <Up> :Go up.",
2525+ "h / <Left> / - :Go to the parent directory.",
2626+ "l / <Right> :Open item or change directory.",
2727+ "g :Go to the top.",
2828+ "G :Go to the bottom.",
2929+ "c :Change directory via path. Will enter input mode.",
3030+ "R :Rename item. Will enter input mode.",
3131+ "D :Delete item.",
3232+ "u :Undo delete/rename.",
3333+ "d :Create directory. Will enter input mode.",
3434+ "% :Create file. Will enter input mode.",
3535+ "/ :Fuzzy search directory. Will enter input mode.",
3636+ ". :Toggle hidden files.",
3737+ ": :Allows for Jido commands to be entered. Please refer to the ",
3838+ " \"Command mode\" section for available commands. Will enter ",
3939+ " input mode.",
4040+ "v :Verbose mode. Provides more information about selected entry. ",
4141+ "",
4242+ "Input mode:",
4343+ "<Esc> :Cancel input.",
4444+ "<CR> :Confirm input.",
4545+ "",
4646+ "Command mode:",
4747+ "<Up> / <Down> :Cycle previous commands.",
4848+ ":q :Exit.",
4949+ ":h :View available keybinds. 'q' to return to app.",
5050+ ":config :Navigate to config directory if it exists.",
5151+ ":trash :Navigate to trash directory if it exists.",
5252+ ":empty_trash :Empty trash if it exists. This action cannot be undone.",
5353+ ":cd <path> :Change directory via path. Will enter input mode.",
5454+};
5555+1756pub const State = enum {
1857 normal,
1958 fuzzy,
···2261 change_dir,
2362 rename,
2463 command,
6464+ help_menu,
2565};
26662767const ActionPaths = struct {
···5494command_history: CommandHistory = CommandHistory{},
5595drawer: Drawer = Drawer{},
56969797+help_menu: List([]const u8),
5798directories: Directories,
5899notification: Notification = Notification{},
59100// Assigned in main after config parsing.
···76117 },
77118 });
78119120120+ var help_menu = List([]const u8).init(alloc);
121121+ try help_menu.fromArray(&help_menu_items);
122122+79123 return App{
80124 .alloc = alloc,
81125 .should_quit = false,
82126 .vx = vx,
83127 .tty = try vaxis.Tty.init(),
84128 .directories = try Directories.init(alloc),
129129+ .help_menu = help_menu,
85130 .text_input = vaxis.widgets.TextInput.init(alloc, &vx.unicode),
86131 .actions = CircStack(Action, actions_len).init(),
87132 .last_known_height = vx.window().height,
···103148 self.alloc.free(command);
104149 }
105150151151+ self.help_menu.deinit();
106152 self.directories.deinit();
107153 self.text_input.deinit();
108154 self.vx.deinit(self.alloc, self.tty.anyWriter());
···160206 switch (self.state) {
161207 .normal => {
162208 try EventHandlers.handleNormalEvent(self, event, &loop);
209209+ },
210210+ .help_menu => {
211211+ try EventHandlers.handleHelpMenuEvent(self, event);
163212 },
164213 else => {
165214 try EventHandlers.handleInputEvent(self, event);