Skip to content

shell: end a comment before its newline, accept a line break after &&, ||, | and inside [[ ]] - #41468

Closed
robobun wants to merge 7 commits into
mainfrom
robobun/184eba09/shell-comment-newline
Closed

robobun wants to merge 7 commits into
mainfrom
robobun/184eba09/shell-comment-newline

shell: end the statement at the newline that ends a comment

ae330d7
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Sep 6, 2026 in 13m 57s

Code review found 1 important issue

Found 2 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/shell_parser/parse.rs:3478 Emitting 'Token::Newline' from 'eat_comment()' regresses scripts that put a trailing comment between an operator and its
🟡 Nit test/js/bun/shell/bunshell.test.ts:935 This test does not exercise the backslash-newline path it names: 'Bun.$' reads 'TemplateStringsArray.raw', so '//' in th