@@ -318,27 +318,50 @@ contexts:
318318
319319 commands-quoted :
320320 - match : (?={{single_quote}})
321- push : [in-command, expect- single-quoted-command]
321+ push : [in-command, single-quoted-command-string ]
322322 - match : (?={{double_quote}})
323- push : [in-command, expect- double-quoted-command]
323+ push : [in-command, double-quoted-command-string ]
324324
325- expect-single-quoted-command :
326- - meta_scope : meta.function-call.powershell variable.function.powershell
327- - include : single-quoted-strings
325+ single-quoted-command-string :
326+ - match : ' {{single_quote}}'
327+ scope : punctuation.definition.string.begin.powershell
328+ push : inside-single-quoted-command-string
328329 - include : immediately-pop
329330
330- expect-double-quoted-command :
331- - meta_scope : meta.function-call.powershell variable.function.powershell
332- - include : double-quoted-strings
331+ inside-single-quoted-command-string :
332+ - meta_include_prototype : false
333+ - meta_scope : meta.string.powershell string.quoted.single.powershell meta.function-call.powershell variable.function.powershell
334+ - match : ' {{single_quote}}{2}'
335+ scope : constant.character.escape.powershell
336+ - match : ' {{single_quote}}'
337+ scope : punctuation.definition.string.end.powershell
338+ pop : 1
339+ - include : path-punctuation
340+
341+ double-quoted-command-string :
342+ - match : ' {{double_quote}}'
343+ scope : punctuation.definition.string.begin.powershell
344+ push : inside-double-quoted-command-string
333345 - include : immediately-pop
334346
347+ inside-double-quoted-command-string :
348+ - meta_include_prototype : false
349+ - meta_scope : meta.string.interpolated.powershell string.quoted.double.powershell meta.function-call.powershell variable.function.powershell
350+ - match : ' {{double_quote}}{2}'
351+ scope : constant.character.escape.powershell
352+ - include : escape-sequences
353+ - match : ' {{double_quote}}'
354+ scope : punctuation.definition.string.end.powershell
355+ pop : 1
356+ - include : string-interpolations
357+ - include : path-punctuation
358+
335359 command-freeform :
336360 - match : ' {{identifier_simple}}'
337361 scope : meta.function-call.powershell variable.function.powershell
338362 push : in-command
339363
340364 in-command :
341- # - meta_scope: region.pinkish
342365 - include : redirection
343366 - include : command-ending-sequences
344367 - include : cli-parameters
@@ -349,8 +372,7 @@ contexts:
349372 - meta_scope : string.unquoted.powershell
350373 - match : (?=[\s#|>;,]|$)
351374 pop : 1
352- - match : ' [\\/:.]'
353- scope : punctuation.separator.powershell
375+ - include : path-punctuation
354376 - include : escape-sequences
355377
356378 command-ending-sequences :
@@ -1212,6 +1234,10 @@ contexts:
12121234
12131235# ##[ COMPONENTS ]##############################################################
12141236
1237+ path-punctuation :
1238+ - match : ' [:/\\.]+'
1239+ scope : punctuation.separator.powershell
1240+
12151241 line-continuations :
12161242 - match : (`)\n
12171243 captures :
0 commit comments