You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] oh-my-bash interactive (-i) load defines 13/326 functions — lib discovery cascade dies at _omb_util_glob_expand (#148 eval-glob family residual in the interactive path) #251
Found by: wt4/regfix lane issue round (2026-09-27), script-file-verified against WSL GNU Bash 5.3.0 with the same corpus and isolated HOME on both sides.
Summary: Interactive (-i) load of oh-my-bash defines only 13 functions under rubash versus 326 under GNU 5.3.0 (the ci-lane observation that queued this issue was 6/324 on an earlier build; the number moved with recent funsub/comsub work but stays in the single digits — ~96% of the framework is missing).
Root-cause lead (stderr without the silencing, p5b-omb-stderr.sh in the same directory):
oh-my-bash (module_require): module 'lib:omb-util' not found.
oh-my-bash (module_require): module 'lib:utils' not found.
rubash.exe: _omb_util_glob_expand: command not found
oh-my-bash (module_require): module 'lib:' not found.
...
The lib-layer discovery cascade still dies at _omb_util_glob_expand (lib/utils.sh:424, eval -- "$1=($2)" + nullglob) — the same root-cause family as the closed #148/#160 (glob-after-parameter / eval-arr-glob). _omb_module_require_lib '*.bash' '*.sh' resolves nothing, so lib:omb-util / lib:utils never load and everything downstream (themes, prompt construction, aliases, completions) is absent. Non-interactive theme probes previously reached 46-71/324-355 (#148 verification matrix, target-ecosys/REPORT.md C-1); the interactive path is at 13.
Rubash owner: glob expansion inside eval arr=(glob) under nullglob in the interactive source path — the #148 fix family (src/executor/ eval/word-list glob admission); whichever residual gate still rejects these patterns in the -i source context.
Classification: rubash-caused (WSL GNU 5.3.0 oracle, same corpus, both sides SRC_RC=0). Blocks oh-my-bash as a daily interactive shell on Windows.
Artifacts:target/issue-suites/results/wt4-regfix/issue-probes/p5-omb-interactive.sh, p5b-omb-stderr.sh; corpus at target-ecosys/repos/oh-my-bash; prior analysis target-ecosys/REPORT.md (C-1) and target-ecosys/issues-batch.md.
Cross-repo tracking note from the niubash side: this issue is a tracked dependency for the full oh-my-bash INTERACTIVE experience in niubash's plugin layer (interactive -i load currently defines 13/326 functions; the lib discovery cascade dying at _omb_util_glob_expand is what keeps themes/prompt construction off the interactive path).
Status on our side (unixwin/niubash branch wt/plugin-integration, commit d857397 — design doc docs/planning/oh-my-niu-ecosystem.md sections 11-12, addenda A and B):
oh-my-bash is now integrated as a first-class external plugin-manager source (source-adapter: detect/install/update/uninstall/list, untrusted-by-default registry, tree-checksum verification, rollback). The adapter's layout fingerprint and guarded loader (OSH/OSH_THEME + source oh-my-bash.sh) keep oh-my-bash's own loading path.
The script face is corpus-proven and byte-pinned: the vendored theme loads through the niubash engine and composes PS1 in tests/plugin_sources.rs, matching the byte-green rubash regression canary tests/regression/fixtures/eco-omb-theme-ps1.sh; the non-interactive guard (loader is a no-op under -c) is also pinned.
Interactive activation (themes taking over PS1 in a live session) is explicitly gated on this issue per the design's canary staging (oh-my-niu-ecosystem.md section 3.3 / section 12.6): install/trust/catalog/loader protocol all work today; the interactive payoff lands when the 13/326 gap closes here.
No rubash changes were made for this; niubash-side only.
Fixed in wt5/omb. Root cause was three stacked layers, all on the interactive source path:
Compound array assignments never brace-expanded. GNU order: arrayfunc.c:557-605 expand_compound_array_assignment tokenizes the raw body (parse_string_to_word_list, arrayfunc.c:581) and runs brace expansion on the RAW words BEFORE parameter expansion (expand_words_no_vars at arrayfunc.c:605 → subst.c:12590 expand_word_list_internal(list, WEXP_NOVARS); WEXP_NOVARS includes WEXP_BRACEEXP at subst.c:12570; brace_expand_word_list at subst.c:13235 runs before shell_expand_word_list at 13240). Rubash expanded parameters across the whole body first, so $locations=({"$OSH_CUSTOM","$OSH"}/lib/"$name".{bash,sh}) (oh-my-bash oh-my-bash.sh:73) arrived outer-wrapped in data quotes and the late brace pass refused it → module 'lib:omb-util' not found cascade. Fixed: raw-word brace pre-pass in expand_assignment_value_inner (assignment_expansion.rs) + E301/E302 carrier-aware brace scanner (expand/braces.rs, mirrors braces.c:189-193 quoted-state) + partially-quoted element storage keeps walker quote syntax (compound_plain_element_value_fields).
${V:-} inside double quotes swallowed the rest of the script (omb-prompt-base.sh:194 "${SCM_THEME_PROMPT_CLEAN:-✔}"): scan_braced_parameter's char→byte translation table broke early (byte index compared against char index) and the input.len() fallback consumed everything past the }. Fixed in lexer/dolbrace.rs with a regression test.
Acceptance (WSL GNU 5.3.0 oracle, same corpus, isolated HOME both sides): SRC_RC=0; interactive load defines 252 functions vs GNU 326 — all 74 missing functions come from /usr/share/bash-completion/bash_completion, which exists only in WSL (environment-bound; verified every missing name is defined there). Function-name sets are otherwise identical; zero stderr cascade errors. PS1 byte-identical in both plain and OSH_THEME=font runs; alias count 33=33. Probe artifacts: target/issue-suites/results/wt5-omb/issue-probes/ (wt5/omb worktree).
Activity
lexer: brace-scan resume must restore the snapshot position — depth>=…
caomengxuan666 commentedon Sep 27, 2026
Cross-repo tracking note from the niubash side: this issue is a tracked dependency for the full oh-my-bash INTERACTIVE experience in niubash's plugin layer (interactive
-iload currently defines 13/326 functions; the lib discovery cascade dying at_omb_util_glob_expandis what keeps themes/prompt construction off the interactive path).Status on our side (unixwin/niubash branch
wt/plugin-integration, commitd857397— design docdocs/planning/oh-my-niu-ecosystem.mdsections 11-12, addenda A and B):OSH/OSH_THEME+source oh-my-bash.sh) keep oh-my-bash's own loading path.tests/plugin_sources.rs, matching the byte-green rubash regression canarytests/regression/fixtures/eco-omb-theme-ps1.sh; the non-interactive guard (loader is a no-op under-c) is also pinned.oh-my-niu-ecosystem.mdsection 3.3 / section 12.6): install/trust/catalog/loader protocol all work today; the interactive payoff lands when the 13/326 gap closes here.No rubash changes were made for this; niubash-side only.
caomengxuan666 commentedon Sep 27, 2026
Fixed in wt5/omb. Root cause was three stacked layers, all on the interactive source path:
Compound array assignments never brace-expanded. GNU order: arrayfunc.c:557-605 expand_compound_array_assignment tokenizes the raw body (parse_string_to_word_list, arrayfunc.c:581) and runs brace expansion on the RAW words BEFORE parameter expansion (expand_words_no_vars at arrayfunc.c:605 → subst.c:12590 expand_word_list_internal(list, WEXP_NOVARS); WEXP_NOVARS includes WEXP_BRACEEXP at subst.c:12570; brace_expand_word_list at subst.c:13235 runs before shell_expand_word_list at 13240). Rubash expanded parameters across the whole body first, so
$locations=({"$OSH_CUSTOM","$OSH"}/lib/"$name".{bash,sh})(oh-my-bash oh-my-bash.sh:73) arrived outer-wrapped in data quotes and the late brace pass refused it →module 'lib:omb-util' not foundcascade. Fixed: raw-word brace pre-pass in expand_assignment_value_inner (assignment_expansion.rs) + E301/E302 carrier-aware brace scanner (expand/braces.rs, mirrors braces.c:189-193 quoted-state) + partially-quoted element storage keeps walker quote syntax (compound_plain_element_value_fields).Sourced-file EXIT traps in comsubs never fired (shared with [bug] modernish init: FTL_FLOWCORR1 region executes twice inside $( command . fatal.sh ) — init aborts 128 (unmasked after ecosuite fixes) #252): the comsub exit trap was gated on a word-level
has_trap_commandtext check (rubash#117 anti-pattern) — removed; unconditional run_exit_trap per subst.c:7340-7341.${V:-} inside double quotes swallowed the rest of the script (omb-prompt-base.sh:194
"${SCM_THEME_PROMPT_CLEAN:-✔}"): scan_braced_parameter's char→byte translation table broke early (byte index compared against char index) and the input.len() fallback consumed everything past the}. Fixed in lexer/dolbrace.rs with a regression test.Acceptance (WSL GNU 5.3.0 oracle, same corpus, isolated HOME both sides): SRC_RC=0; interactive load defines 252 functions vs GNU 326 — all 74 missing functions come from /usr/share/bash-completion/bash_completion, which exists only in WSL (environment-bound; verified every missing name is defined there). Function-name sets are otherwise identical; zero stderr cascade errors. PS1 byte-identical in both plain and OSH_THEME=font runs; alias count 33=33. Probe artifacts: target/issue-suites/results/wt5-omb/issue-probes/ (wt5/omb worktree).
plugins: external plugin-manager sources as first-class origins (desi…