Skip to content

Comments

fix(bash): backslash-newline line continuation in double quotes#247

Merged
chaliy merged 1 commit intomainfrom
claude/bashkit-bash-compatibility-BsDKD
Feb 24, 2026
Merged

fix(bash): backslash-newline line continuation in double quotes#247
chaliy merged 1 commit intomainfrom
claude/bashkit-bash-compatibility-BsDKD

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 24, 2026

Summary

  • Fix \<newline> inside double-quoted strings to act as line continuation (discard both chars)
  • Fixed in both read_double_quoted_string and read_word's inline quote handler
  • Per POSIX, \<newline> in double quotes should be removed, joining the lines

Test plan

  • 5 new spec tests for line continuation in double-quoted strings, variable assignments, multi-line, unquoted, and escape preservation
  • All 1199 spec tests pass (1194 pass, 5 skip)
  • cargo clippy and cargo fmt clean

\<newline> inside double-quoted strings was preserved literally instead
of being treated as a line continuation (POSIX requires both chars to
be discarded). Fixed in both read_double_quoted_string and read_word's
inline quote handler.

Add 5 spec tests for line continuation scenarios.
@chaliy chaliy merged commit 1d67da0 into main Feb 24, 2026
16 checks passed
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.

2 participants