From 95156f7ed2805ff3d4b3112354a4804f15e43b9a Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sat, 18 Jul 2026 22:30:37 -0700 Subject: [PATCH] fix: install-extras' preselect loop never ran more than once for each in {1..${#_extras[@]}} doesn't expand as a range - bash does brace expansion before parameter expansion, so the range endpoint isn't resolved yet when brace expansion runs. The loop always ran exactly once, leaving preselect at length 1 regardless of how many extras exist. Invisible until now because there was only ever one extra (model-cache-redirect); would have silently broken any preselected-true default on a 2nd+ extra. Switched to a C-style loop. This is almost certainly the multiselect misbehavior from years back - tracked down while verifying multiselect() itself (functions/PRbL submodule, fixed separately) didn't have a toggle-isolation bug. --- install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8d51565..b8cafe8 100755 --- a/install.sh +++ b/install.sh @@ -318,7 +318,13 @@ install-extras(){ # done boxborder "Which extras should be installed?" - for each in {1..${#_extras[@]}} ; do + # NOTE: {1..${#_extras[@]}} does NOT expand as a range - bash performs + # brace expansion before parameter expansion, so the range's endpoint + # isn't resolved yet when brace expansion runs. This always looped + # exactly once (leaving preselect at length 1 regardless of extras + # count), invisible only because there was ever just one extra. Use a + # C-style loop instead, which resolves ${#_extras[@]} correctly. + for ((each=0; each<${#_extras[@]}; each++)); do preselect+=("false") done multiselect result _extras preselect