Skip to content

Commit c8796d1

Browse files
committed
Deny backslashes in block variables
The variable names in for-in loops and select blocks are really variable names, not strings, and may not contain backslashes or escape sequences.
1 parent 8879eba commit c8796d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Syntaxes/Shell-Unix-Bash.tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@
12921292
</dict>
12931293
<dict>
12941294
<key>begin</key>
1295-
<string>(?&lt;=^|;|&amp;|\s)(for)\s+((?:[^\s\\]|\\.)+)(?=\s|;|&amp;|$)</string>
1295+
<string>(?&lt;=^|;|&amp;|\s)(for)\s+([^\s\\]+)(?=\s|;|&amp;|$)</string>
12961296
<key>beginCaptures</key>
12971297
<dict>
12981298
<key>1</key>
@@ -1351,7 +1351,7 @@
13511351
</dict>
13521352
<dict>
13531353
<key>begin</key>
1354-
<string>(?&lt;=^|;|&amp;|\s)(select)\s+((?:[^\s\\]|\\.)+)(?=\s|;|&amp;|$)</string>
1354+
<string>(?&lt;=^|;|&amp;|\s)(select)\s+([^\s\\]+)(?=\s|;|&amp;|$)</string>
13551355
<key>beginCaptures</key>
13561356
<dict>
13571357
<key>1</key>

0 commit comments

Comments
 (0)