From c2777be4a3ac4299d73f80a34930fed29d911107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Hallenbarter?= Date: Mon, 26 Jan 2026 09:10:37 +0000 Subject: [PATCH] added flush stdout to ask function --- install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install.sh b/install.sh index ac74f98..c434215 100755 --- a/install.sh +++ b/install.sh @@ -26,11 +26,16 @@ ask_app() { local label="$1" local default="$2" local app + while true; do + # Print prompt and flush stdout printf "%s (default: %s): " "$label" "$default" + fflush + read -r app app="${app:-$default}" + # check if command exists if command -v "${app%% *}" >/dev/null 2>&1; then echo "$app" return @@ -41,6 +46,12 @@ ask_app() { done } +# Helper function to flush stdout +fflush() { + : +} + + # ---------------------------- # Installer # ----------------------------