From da7f3d0b34e842c0d0b07d865b45847b1c52f48a Mon Sep 17 00:00:00 2001 From: Marvin Lehmann Date: Tue, 26 May 2015 16:33:19 +0200 Subject: [PATCH] Added default input "y" when opening console Now you just have to press ENTER. Note that this requires v4 of bash. --- functions/fn_console | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/fn_console b/functions/fn_console index ddaa47c58..d4b8c01a3 100644 --- a/functions/fn_console +++ b/functions/fn_console @@ -17,7 +17,7 @@ echo "Press \"CTRL+b d\" to exit console." fn_printwarningnl "Do NOT press CTRL+c to exit." echo "" while true; do - read -p "Continue? [y/N]" yn + read -e -i "y" -p "Continue? [y/N]" yn case $yn in [Yy]* ) break;; [Nn]* ) echo Exiting; return 1;; @@ -45,4 +45,4 @@ else * ) echo "Please answer yes or no.";; esac done -fi \ No newline at end of file +fi