Skip to content

Commit fcac7b6

Browse files
committed
Added operators to be included in the command highlighting
1 parent 8459fba commit fcac7b6

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

PowerShellSyntax.tmLanguage

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,15 @@
266266
<key>comment</key>
267267
<string>Verb-Noun</string>
268268
<key>end</key>
269-
<string>((?=\))|(?&lt;!`)\n|(?&lt;!`)\r|\|)</string>
269+
<string>((?=\))|(?&lt;!`)\n|(?&lt;!`)\r|(\|))</string>
270+
<key>endCaptures</key>
271+
<dict>
272+
<key>2</key>
273+
<dict>
274+
<key>name</key>
275+
<string>keyword.operator.powershell</string>
276+
</dict>
277+
</dict>
270278
<key>name</key>
271279
<string>meta.command.powershell</string>
272280
<key>patterns</key>
@@ -279,10 +287,18 @@
279287
<key>include</key>
280288
<string>#lineComment</string>
281289
</dict>
290+
<dict>
291+
<key>include</key>
292+
<string>#redirection</string>
293+
</dict>
282294
<dict>
283295
<key>include</key>
284296
<string>#numericConstant</string>
285297
</dict>
298+
<dict>
299+
<key>include</key>
300+
<string>#operators</string>
301+
</dict>
286302
<dict>
287303
<key>include</key>
288304
<string>#variable</string>
@@ -868,7 +884,7 @@
868884
<key>comment</key>
869885
<string>Command invocation (Call)</string>
870886
<key>match</key>
871-
<string>(&amp;)</string>
887+
<string>(&amp;|\|)</string>
872888
<key>name</key>
873889
<string>keyword.operator.other.powershell</string>
874890
</dict>

0 commit comments

Comments
 (0)