mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 13:16:47 +00:00
fix: correctly parse comma-separated indices for batch uninstall selection
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user