Fix bug in select loop so multiple options do not appear on the same line.

This commit is contained in:
Storm Dragon
2026-06-05 13:16:48 -04:00
parent f6e2e2f4c8
commit 13e3ce64fd
@@ -192,6 +192,7 @@ select_disk() {
lsblk -dno NAME,SIZE,TYPE,MODEL | grep -E "^($(IFS='|'; echo "${disks[*]}")).*disk" || true
PS3="Enter disk number: "
COLUMNS=1
select diskChoice in "${disks[@]}" "Cancel"; do
if [[ "$diskChoice" == "Cancel" ]]; then
log_info "Disk selection cancelled by user"
@@ -268,6 +269,7 @@ select_install_target() {
local manualOption="Use existing /mnt (already mounted root/home/boot)"
PS3="Enter target number: "
COLUMNS=1
select targetChoice in "${disks[@]}" "$manualOption" "Cancel"; do
if [[ "$targetChoice" == "Cancel" ]]; then
log_info "Target selection cancelled by user"
@@ -326,6 +328,7 @@ select_partition_layout() {
)
PS3="Enter layout number: "
COLUMNS=1
select layout in "${layouts[@]}"; do
case "$layout" in
"Single partition"*)
@@ -1088,6 +1091,7 @@ gather_system_info() {
local desktops=("Console only (Fenrir screen reader)" "i3 (tiling window manager)" "MATE (traditional desktop)")
PS3="Enter desktop number: "
COLUMNS=1
select desktop in "${desktops[@]}"; do
case "$desktop" in
"Console only"*)
@@ -1122,6 +1126,7 @@ gather_system_info() {
else
echo "Select which user should automatically login to the graphical session:"
PS3="Enter user number: "
COLUMNS=1
select selectedUser in "${userNames[@]}"; do
if [[ -n "$selectedUser" ]]; then
autoLoginUser="$selectedUser"