mirror of
https://github.com/tw93/Mole.git
synced 2026-02-14 22:50:13 +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=()
|
selected_apps=()
|
||||||
|
|
||||||
# Parse indices and build selected apps array
|
# Parse indices and build selected apps array
|
||||||
# Convert space-separated string to array for better handling
|
# MOLE_SELECTION_RESULT is comma-separated list of indices from the paginated menu
|
||||||
read -a indices_array <<< "$MOLE_SELECTION_RESULT"
|
IFS=',' read -r -a indices_array <<< "$MOLE_SELECTION_RESULT"
|
||||||
|
|
||||||
for idx in "${indices_array[@]}"; do
|
for idx in "${indices_array[@]}"; do
|
||||||
if [[ "$idx" =~ ^[0-9]+$ ]] && [[ $idx -ge 0 ]] && [[ $idx -lt ${#apps_data[@]} ]]; then
|
if [[ "$idx" =~ ^[0-9]+$ ]] && [[ $idx -ge 0 ]] && [[ $idx -lt ${#apps_data[@]} ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user