aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorBruno A. Muciño <[email protected]>2020-09-02 05:31:42 +0100
committerBruno A. Muciño <[email protected]>2020-09-02 05:31:42 +0100
commiteb890f1cc649f8f250ac83a3f5510d91587a4a8d (patch)
tree0f68a5b3cfeee5a3f43ab4e2e6dfc648dc1bc61f /src/app
parent8529b270c4023608d86ab4b98c915970a98ec6f4 (diff)
Adds "wq" command as a combination of "write" and "quit".
Diffstat (limited to 'src/app')
-rw-r--r--src/app/impl_self.rs2
1 files changed, 2 insertions, 0 deletions
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 {
249 "tdown" | "track-down" => "track-down <auto-habit-name> (alias: tdown)", 249 "tdown" | "track-down" => "track-down <auto-habit-name> (alias: tdown)",
250 "q" | "quit" => "quit dijo", 250 "q" | "quit" => "quit dijo",
251 "w" | "write" => "write current state to disk (alias: w)", 251 "w" | "write" => "write current state to disk (alias: w)",
252 "wq" | "writeandquit" => "write current state to disk and quit dijo (alias: wq)",
252 "h"|"?" | "help" => "help [<command>|commands|keys] (aliases: h, ?)", 253 "h"|"?" | "help" => "help [<command>|commands|keys] (aliases: h, ?)",
253 "cmds" | "commands" => "add, add-auto, delete, month-{prev,next}, track-{up,down}, help, quit", 254 "cmds" | "commands" => "add, add-auto, delete, month-{prev,next}, track-{up,down}, help, quit",
254 "keys" => "TODO", // TODO (view?) 255 "keys" => "TODO", // TODO (view?)
@@ -260,6 +261,7 @@ impl App {
260 self.message.set_message("help <command>|commands|keys") 261 self.message.set_message("help <command>|commands|keys")
261 } 262 }
262 } 263 }
264 Command::WriteAndQuit => self.save_state(),
263 Command::Quit | Command::Write => self.save_state(), 265 Command::Quit | Command::Write => self.save_state(),
264 Command::MonthNext => self.sift_forward(), 266 Command::MonthNext => self.sift_forward(),
265 Command::MonthPrev => self.sift_backward(), 267 Command::MonthPrev => self.sift_backward(),