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
Fold a Line Continuation the Way Bash Does Before the Guard Reads a Command #2113
classify in gh-write-guard.py replaces each backslash-newline with a space before any rule reads the command. Bash deletes the pair instead, joining the words on either side, so a word split across a continuation reads as two words to the guard and one to bash. Rule 7 then never sees a sleep or a loop keyword spelled that way.
Reproduce (constructed)
Allowed on develop at 4c9087d, although bash runs sleep:
while [ !-f /nonexistent ];do sl\
eep 1;done
printf 'ec\\\nho joined\n' | bash prints joined, which shows the join. wh\ then ile on the next line does the same for the keyword.
Done looks like
The command above is denied, and a self-test row pins it. Deleting the pair rather than replacing it with a space matches bash, including where a space already sits before the backslash, but every rule reads the folded text, so the change needs the whole self-test.
Found by the local strict review of the #2059 fix.
Closed: Folded into #1959 per #2517, approved by the maintainer. This is a case of the guard's lexer splitting a command differently from bash, and #1959's single bash-aware scanner fixes the class, with this shape kept as a self-test row there.
Activity
Read a Heredoc on a Line Holding (( Every Way a Shell Might in the Wa…
ptr727 commentedon Oct 8, 2026
Closed: Folded into #1959 per #2517, approved by the maintainer. This is a case of the guard's lexer splitting a command differently from bash, and #1959's single bash-aware scanner fixes the class, with this shape kept as a self-test row there.