Skip to content

fix(invocation): default interactive aliases on before CLI overrides - #643

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/interactive-alias-default
Oct 16, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/interactive-alias-default

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Contract and fix

Closes #642. Related host blocker unixwin/niubash#367; broader audit unixwin/niubash#368 remains open.
GNU shell.c:1830 init_interactive enables expand_aliases before shell.c:574-576 run_shopt_alist. Set shared API and standalone interactive defaults before explicit shopt overrides and startup files. Preserve last -O/+O override, rc disabling and noninteractive off.

Evidence

  • 27 focused tests pass across issue312 interactive defaults, interactive startup and restricted invocation regressions.
  • GNU Bash 5.3.0 script-file oracle: 14 cases match stdout and exit0; no byte-exact interactive stderr parity claimed.
  • cargo fmt --check and git diff --check pass.
  • This PR fixes missing invocation defaults, not the separate host read-unit/line identity issue or all alias grammar compatibility. No unrelated performance issue is closed.

…rrides

GNU shell.c:1830 init_interactive enables expand_aliases; shell.c:540-549 main selects interactive initialization before shell.c:574-576 run_shopt_alist and startup files. Apply that default in the shared invocation API and standalone driver, preserving the last explicit -O/+O override and later rc changes.

Closes #642
Related: unixwin/niubash#367
Validation: 27 focused regressions passed; 14 GNU Bash 5.3.0 script-file comparison cases match stdout and exit status. Full alias grammar parity is not claimed.
@caomengxuan666
caomengxuan666 merged commit 3976e0a into master Oct 16, 2026
8 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/interactive-alias-default branch October 16, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interactive invocation does not enable expand_aliases by default (-i / -ic and shared API)

1 participant