From eb890f1cc649f8f250ac83a3f5510d91587a4a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20A=2E=20Muci=C3=B1o?= Date: Tue, 1 Sep 2020 23:31:42 -0500 Subject: Adds "wq" command as a combination of "write" and "quit". --- src/app/impl_self.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/app') diff --git a/src/app/impl_self.rs b/src/app/impl_self.rs index 5cd9616..ce99702 100644 --- a/src/app/impl_self.rs +++ b/src/app/impl_self.rs @@ -249,6 +249,7 @@ impl App { "tdown" | "track-down" => "track-down (alias: tdown)", "q" | "quit" => "quit dijo", "w" | "write" => "write current state to disk (alias: w)", + "wq" | "writeandquit" => "write current state to disk and quit dijo (alias: wq)", "h"|"?" | "help" => "help [|commands|keys] (aliases: h, ?)", "cmds" | "commands" => "add, add-auto, delete, month-{prev,next}, track-{up,down}, help, quit", "keys" => "TODO", // TODO (view?) @@ -260,6 +261,7 @@ impl App { self.message.set_message("help |commands|keys") } } + Command::WriteAndQuit => self.save_state(), Command::Quit | Command::Write => self.save_state(), Command::MonthNext => self.sift_forward(), Command::MonthPrev => self.sift_backward(), -- cgit v1.2.3