From bdf8cd2dd5345bcb908cd8a98e2a11c1d865c167 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Mon, 12 Aug 2019 01:52:09 +0200 Subject: [PATCH] add quit command as alias to exit in cmdline --- examples/repl/cmdline.rs | 2 +- examples/repl/main.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/repl/cmdline.rs b/examples/repl/cmdline.rs index 8aea771f2..ab9b0904e 100644 --- a/examples/repl/cmdline.rs +++ b/examples/repl/cmdline.rs @@ -471,7 +471,7 @@ pub unsafe fn dc_cmdline(context: &Context, line: &str) -> Result<(), failure::E event \n\ fileinfo \n\ clear -- clear screen\n\ - exit\n\ + exit or quit\n\ =============================================" ), }, diff --git a/examples/repl/main.rs b/examples/repl/main.rs index c89ce9104..92f36cb12 100644 --- a/examples/repl/main.rs +++ b/examples/repl/main.rs @@ -335,8 +335,8 @@ const CONTACT_COMMANDS: [&'static str; 6] = [ "delcontact", "cleanupcontacts", ]; -const MISC_COMMANDS: [&'static str; 8] = [ - "getqr", "getbadqr", "checkqr", "event", "fileinfo", "clear", "exit", "help", +const MISC_COMMANDS: [&'static str; 9] = [ + "getqr", "getbadqr", "checkqr", "event", "fileinfo", "clear", "exit", "quit", "help", ]; impl Hinter for DcHelper { @@ -550,7 +550,7 @@ unsafe fn handle_cmd(line: &str, ctx: Arc>) -> Result return Ok(ExitResult::Exit), + "exit" | "quit" => return Ok(ExitResult::Exit), _ => dc_cmdline(&ctx.read().unwrap(), line)?, }