From 53bb2751a35f107b3c2d3e5965d21c2ecb55201d Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sun, 5 Oct 2025 19:16:11 +0800 Subject: [PATCH] fix: correctly parse comma-separated indices for batch uninstall selection --- lib/app_selector.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/app_selector.sh b/lib/app_selector.sh index 49ba3f3..4ed1264 100755 --- a/lib/app_selector.sh +++ b/lib/app_selector.sh @@ -59,8 +59,8 @@ select_apps_for_uninstall() { selected_apps=() # Parse indices and build selected apps array - # Convert space-separated string to array for better handling - read -a indices_array <<< "$MOLE_SELECTION_RESULT" + # MOLE_SELECTION_RESULT is comma-separated list of indices from the paginated menu + IFS=',' read -r -a indices_array <<< "$MOLE_SELECTION_RESULT" for idx in "${indices_array[@]}"; do if [[ "$idx" =~ ^[0-9]+$ ]] && [[ $idx -ge 0 ]] && [[ $idx -lt ${#apps_data[@]} ]]; then