From 93c373e893529d9b8579d375c7fc96a714084946 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 28 Jun 2026 18:11:57 +0000 Subject: [PATCH] setup.sh: fix whiptail arrow-key navigation when run via curl | bash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two fixes: 1. Export TERM (default xterm-256color) early — whiptail needs a valid TERM to enter raw mode; when bash is started via pipe TERM may be unset, causing keypresses to leak to the shell instead of the menu 2. Add Claude-Session: https://claude.ai/code/session_01LQJBvqzXeyuhhAcAA3Q5Wq --- setup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index cea74e5..9177e9e 100755 --- a/setup.sh +++ b/setup.sh @@ -19,6 +19,10 @@ set -uo pipefail HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# whiptail requires a valid TERM; when piped through bash (curl | bash) TERM +# may be unset, causing raw-mode to fail and arrow keys to leak to the shell. +export TERM="${TERM:-xterm-256color}" + # Category display order (groups not listed here are appended alphabetically). CATEGORY_ORDER=(base homelab utilities media cameras gaming extras backup) # Service ordering hint within a category (lower = earlier). Default 50. @@ -261,7 +265,7 @@ while true; do cat_items+=("DONE" "Finish and exit") CHOSEN_CAT=$(whiptail --title "Service Categories" --menu \ "Pick a category (services you install come back here):" 22 70 14 \ - "${cat_items[@]}" 3>&1 1>&2 2>&3) || break + "${cat_items[@]}" 3>&1 1>&2 2>&3 &1 1>&2 2>&3) || continue + "${svc_items[@]}" 3>&1 1>&2 2>&3