From 1aa93ebba816b16aad8da3b3bdb73cb596088277 Mon Sep 17 00:00:00 2001 From: Ricardo Monla Date: Sun, 7 Jun 2026 00:11:17 -0300 Subject: [PATCH] fix: corregir renderizado de colores en prompts ask() y confirm() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit read -rp no interpreta escapes ANSI — reemplazado por printf + read -r. Co-Authored-By: Claude Sonnet 4.6 --- rm-multiboot.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rm-multiboot.sh b/rm-multiboot.sh index 9a75c20..439f923 100755 --- a/rm-multiboot.sh +++ b/rm-multiboot.sh @@ -73,17 +73,20 @@ divider() { echo -e "\n ${B}───────────────── ask() { local prompt="$1" default="${2:-}" answer if [[ -n "$default" ]]; then - read -rp " ${W}$prompt${N} [$default]: " answer + printf " ${W}%s${N} [%s]: " "$prompt" "$default" + read -r answer echo "${answer:-$default}" else - read -rp " ${W}$prompt${N}: " answer + printf " ${W}%s${N}: " "$prompt" + read -r answer echo "$answer" fi } confirm() { local answer - read -rp " ${W}$* [s/N]:${N} " answer + printf " ${W}%s [s/N]:${N} " "$*" + read -r answer [[ "${answer,,}" == "s" ]] }