From 0993e3845db664459e97a68e426ffc883cc190e8 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Sun, 4 Aug 2019 09:25:35 +0300 Subject: [PATCH] Use Q for quitting instead of any key --- src/main.rs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 84276e9f..75024058 100644 --- a/src/main.rs +++ b/src/main.rs @@ -511,15 +511,21 @@ fn run() -> Result<(), Error> { } if config.keep_at_end() { - print_info("\n(R)eboot\n(S)hell\n\nPress any other key to continue"); - match get_char() { - 's' | 'S' => { - run_shell(); + print_info("\n(R)eboot\n(S)hell\n(Q)uit"); + loop { + match get_char() { + 's' | 'S' => { + run_shell(); + } + 'r' | 'R' => { + reboot(); + } + 'q' | 'Q' => (), + _ => { + continue; + } } - 'r' | 'R' => { - reboot(); - } - _ => (), + break; } }