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
parser: shopt -s expand_aliases breaks function NAME<TAB># comment heads (body executes inline) — breaks GNU example dirstack #388
shopt -s expand_aliases
function d # display the directory stack
{
echo ran-d
}
echo after
WSL GNU Bash 5.3.0:
after
rc 0, empty stderr
rubash:
ran-d
after
stderr: <script>: line 2: function: command not found
rc 0
The function head is not recognized once expand_aliases is on, so the body executes inline.
Impact
third_party/bash/examples/functions/dirstack fails wholesale under rubash (function: command not found at line 140, local: can only be used in a function, the display loop runs, ((: i+1: expression recursion level exceeded). GNU runs the same file silently (rc 0, no output) when line endings are LF; the vendored working-tree copy is CRLF, which GNU rejects entirely (noise) but rubash is designed to tolerate.
Notes
Without the shopt -s expand_aliases line the same head parses fine (probe B16, byte-identical); plain CRLF functions also parse fine (B17).
Raw artifacts: target/issue-suites/results/wt33-373/run/B19_shopt_alias_fn.*, bisect log in the lane notes.
cli_tests::examples::gnu_dirstack is left #[ignore] referencing this issue.
Landed on master (wt37/gapfix1 batch, CI green on bbccb1c): see the issue-suite tests/issue388_*_regressions.rs and the lane's two-shell matrices on the ticket trail. Master carries the fix; suites green.
Activity
fix(#388): strip word-initial comment SPANS in the function-head sign…
caomengxuan666 commentedon Oct 2, 2026
Landed on master (wt37/gapfix1 batch, CI green on bbccb1c): see the issue-suite tests/issue388_*_regressions.rs and the lane's two-shell matrices on the ticket trail. Master carries the fix; suites green.