{ "name": "PowerShell", "scopeName": "source.powershell", "patterns": [ { "name": "comment.block.powershell", "begin": "\u003c#", "end": "#\u003e", "patterns": [ { "include": "#commentEmbeddedDocs" } ], "beginCaptures": { "0": { "name": "punctuation.definition.comment.block.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.block.end.powershell" } } }, { "name": "keyword.operator.redirection.powershell", "match": "[2-6]\u003e\u00261|\u003e\u003e|\u003e|\u003c\u003c|\u003c|\u003e|\u003e\\||[1-6]\u003e|[1-6]\u003e\u003e" }, { "include": "#commands" }, { "include": "#commentLine" }, { "include": "#variable" }, { "include": "#interpolatedStringContent" }, { "include": "#function" }, { "include": "#attribute" }, { "include": "#UsingDirective" }, { "include": "#type" }, { "include": "#hashtable" }, { "include": "#doubleQuotedString" }, { "include": "#scriptblock" }, { "include": "#doubleQuotedStringEscapes" }, { "name": "string.quoted.single.powershell", "begin": "(?\u003c!')'", "end": "'(?!')", "patterns": [ { "name": "constant.character.escape.powershell", "match": "''" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } } }, { "name": "string.quoted.double.heredoc.powershell", "begin": "\\@\"(?=$)", "end": "^\"@", "patterns": [ { "include": "#variableNoProperty" }, { "include": "#doubleQuotedStringEscapes" }, { "include": "#interpolation" } ] }, { "name": "string.quoted.single.heredoc.powershell", "begin": "\\@'(?=$)", "end": "^'@", "patterns": [ { "name": "constant.character.escape.powershell", "match": "''" } ] }, { "include": "#numericConstant" }, { "name": "meta.group.array-expression.powershell", "begin": "(@)(\\()", "end": "\\)", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "keyword.other.array.begin.powershell" }, "2": { "name": "punctuation.section.group.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } } }, { "name": "meta.group.complex.subexpression.powershell", "begin": "(\\$)(\\()", "end": "\\)", "patterns": [ { "include": "$self" } ], "beginCaptures": { "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "punctuation.section.group.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } } }, { "name": "support.function.powershell", "match": "(\\b(([A-Za-z0-9\\-_\\.]+)\\.(?i:exe|com|cmd|bat))\\b)" }, { "name": "keyword.control.powershell", "match": "(?\u003c!\\w|-|\\.)((?i:begin|break|catch|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\\?)(?!\\w)" }, { "name": "keyword.control.powershell", "match": "(?\u003c!\\w|-|[^\\)]\\.)((?i:(foreach|where)(?!-object))|%|\\?)(?!\\w)" }, { "begin": "(?\u003c!\\w)(--%)(?!\\w)", "end": "$", "patterns": [ { "name": "string.unquoted.powershell", "match": ".+" } ], "beginCaptures": { "1": { "name": "keyword.control.powershell" } } }, { "name": "storage.modifier.powershell", "match": "(?\u003c!\\w)((?i:hidden|static))(?!\\w)" }, { "match": "(?\u003c!\\w|-)((?i:class)|%|\\?)(?:\\s)+((?:\\p{L}|\\d|_|-|)+)\\b", "captures": { "1": { "name": "storage.type.powershell" }, "2": { "name": "entity.name.function" } } }, { "name": "keyword.operator.comparison.powershell", "match": "(?\u003c!\\w)-(?i:is(?:not)?|as)\\b" }, { "name": "keyword.operator.comparison.powershell", "match": "(?\u003c!\\w)-(?i:[ic]?(?:eq|ne|[gl][te]|(?:not)?(?:like|match|contains|in)|replace))(?!\\p{L})" }, { "name": "keyword.operator.unary.powershell", "match": "(?\u003c!\\w)-(?i:join|split)(?!\\p{L})|!" }, { "name": "keyword.operator.logical.powershell", "match": "(?\u003c!\\w)-(?i:and|or|not|xor)(?!\\p{L})|!" }, { "name": "keyword.operator.bitwise.powershell", "match": "(?\u003c!\\w)-(?i:band|bor|bnot|bxor|shl|shr)(?!\\p{L})" }, { "name": "keyword.operator.string-format.powershell", "match": "(?\u003c!\\w)-(?i:f)(?!\\p{L})" }, { "name": "keyword.operator.assignment.powershell", "match": "[+%*/-]?=|[+/*%-]" }, { "name": "punctuation.terminator.statement.powershell", "match": "\\|{2}|\u0026{2}|;" }, { "name": "keyword.operator.other.powershell", "match": "\u0026|(?\u003c!\\w)\\.(?= )|`|,|\\|" }, { "name": "keyword.operator.range.powershell", "match": "(?\u003c!\\s|^)\\.\\.(?=\\-?\\d|\\(|\\$)" } ], "repository": { "RequiresDirective": { "name": "meta.requires.powershell", "begin": "(?\u003c=#)(?i:(requires))\\s", "end": "$", "patterns": [ { "name": "keyword.other.powershell", "match": "\\-(?i:Modules|PSSnapin|RunAsAdministrator|ShellId|Version)" }, { "name": "variable.parameter.powershell", "match": "(?\u003c!-)\\b\\p{L}+|\\d+(?:\\.\\d+)*" }, { "include": "#hashtable" } ], "beginCaptures": { "0": { "name": "keyword.control.requires.powershell" } } }, "UsingDirective": { "match": "(?\u003c!\\w)(?i:(using))\\s+(?i:(namespace|module))\\s+(?i:((?:\\w+(?:\\.)?)+))", "captures": { "1": { "name": "keyword.control.using.powershell" }, "2": { "name": "keyword.other.powershell" }, "3": { "name": "variable.parameter.powershell" } } }, "attribute": { "name": "meta.attribute.powershell", "begin": "(\\[)\\s*\\b(?i)(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength)\\b", "end": "(\\])", "patterns": [ { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "#variable" }, { "include": "#variableNoProperty" }, { "include": "#hashtable" }, { "include": "#scriptblock" }, { "include": "#doubleQuotedStringEscapes" }, { "include": "#doubleQuotedString" }, { "include": "#type" }, { "include": "#numericConstant" }, { "include": "#doubleQuotedString" }, { "include": "$self" }, { "match": "(?i)\\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\\b(?:\\s+)?(=)?", "captures": { "1": { "name": "variable.parameter.attribute.powershell" }, "2": { "name": "keyword.operator.assignment.powershell" } } }, { "name": "string.quoted.single.powershell", "begin": "(?\u003c!')'", "end": "'(?!')", "patterns": [ { "name": "constant.character.escape.powershell", "match": "''" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } } } ], "beginCaptures": { "0": { "name": "punctuation.section.group.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } } } ], "beginCaptures": { "1": { "name": "punctuation.section.bracket.begin.powershell" }, "2": { "name": "support.function.attribute.powershell" } }, "endCaptures": { "1": { "name": "punctuation.section.bracket.end.powershell" } } }, "commands": { "patterns": [ { "name": "support.function.powershell", "match": "(?:(\\p{L}|\\d|_|-|\\\\|\\:)*\\\\)?\\b(?i:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)\\-.+?(?:\\.(?i:exe|cmd|bat|ps1))?\\b" }, { "name": "support.function.powershell", "match": "(?\u003c!\\w)(?i:foreach-object)(?!\\w)" }, { "name": "support.function.powershell", "match": "(?\u003c!\\w)(?i:where-object)(?!\\w)" }, { "name": "support.function.powershell", "match": "(?\u003c!\\w)(?i:sort-object)(?!\\w)" }, { "name": "support.function.powershell", "match": "(?\u003c!\\w)(?i:tee-object)(?!\\w)" } ] }, "commentEmbeddedDocs": { "patterns": [ { "name": "comment.documentation.embedded.powershell", "match": "^(?i:(?:\\s?|#)+(\\.)(COMPONENT|DESCRIPTION|EXAMPLE|EXTERNALHELP|FORWARDHELPCATEGORY|FORWARDHELPTARGETNAME|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|REMOTEHELPRUNSPACE|ROLE|SYNOPSIS))", "captures": { "1": { "name": "constant.string.documentation.powershell" }, "2": { "name": "keyword.operator.documentation.powershell" } } }, { "name": "comment.documentation.embedded.powershell", "match": "(?i:\\s?(\\.)(PARAMETER|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP)\\s+([a-z0-9-_]+))", "captures": { "1": { "name": "constant.string.documentation.powershell" }, "2": { "name": "keyword.operator.documentation.powershell" }, "3": { "name": "keyword.operator.documentation.powershell" } } } ] }, "commentLine": { "name": "comment.line.powershell", "begin": "(?\u003c![`\\\\-])#", "end": "$\\n?", "patterns": [ { "include": "#commentEmbeddedDocs" }, { "include": "#RequiresDirective" } ], "captures": { "0": { "name": "punctuation.definition.comment.powershell" } } }, "doubleQuotedString": { "name": "string.quoted.double.powershell", "begin": "(?\u003c!(?\u003c!`)\")\"", "end": "\"(?!\")", "patterns": [ { "match": "(?i)\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,64}\\b" }, { "include": "#variableNoProperty" }, { "include": "#variable" }, { "include": "#doubleQuotedStringEscapes" }, { "include": "#interpolation" }, { "name": "keyword.other.powershell", "match": "`\\s*$" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.powershell" } } }, "doubleQuotedStringEscapes": { "patterns": [ { "name": "constant.character.escape.powershell", "match": "`[0abnfrvt\"'$`]" }, { "name": "constant.character.escape.powershell", "match": "\"\"" } ] }, "function": { "begin": "^(?:\\s*+)(?i)(function|filter|configuration|workflow)\\s+(?:(global|local|script|private):)?((?:\\p{L}|\\d|_|-|\\.)+)", "end": "(?=\\{|\\()", "patterns": [ { "include": "#commentLine" } ], "beginCaptures": { "0": { "name": "meta.function.powershell" }, "1": { "name": "storage.type.powershell" }, "2": { "name": "storage.modifier.scope.powershell" }, "3": { "name": "entity.name.function.powershell" } } }, "hashtable": { "name": "meta.hashtable.powershell", "begin": "(@)(\\{)", "end": "(\\})", "patterns": [ { "name": "meta.hashtable.assignment.powershell", "match": "\\b((?:\\'|\\\")?)(\\w+)((?:\\'|\\\")?)(?:\\s+)?(=)(?:\\s+)?", "captures": { "1": { "name": "punctuation.definition.string.begin.powershell" }, "2": { "name": "variable.other.readwrite.powershell" }, "3": { "name": "punctuation.definition.string.end.powershell" }, "4": { "name": "keyword.operator.assignment.powershell" } } }, { "include": "#scriptblock" }, { "include": "$self" } ], "beginCaptures": { "1": { "name": "keyword.other.hashtable.begin.powershell" }, "2": { "name": "punctuation.section.braces.begin.powershell" } }, "endCaptures": { "1": { "name": "punctuation.section.braces.end.powershell" } } }, "interpolatedStringContent": { "contentName": "interpolated.simple.source.powershell", "begin": "\\(", "end": "\\)", "patterns": [ { "include": "$self" }, { "include": "#interpolation" }, { "include": "#interpolatedStringContent" } ], "beginCaptures": { "0": { "name": "punctuation.section.group.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } } }, "interpolation": { "contentName": "interpolated.complex.source.powershell", "begin": "(\\$)(\\()", "end": "\\)", "patterns": [ { "include": "$self" }, { "include": "#interpolation" }, { "include": "#interpolatedStringContent" } ], "beginCaptures": { "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "punctuation.section.group.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.section.group.end.powershell" } } }, "numericConstant": { "patterns": [ { "match": "(?\u003c!\\w)([-+]?0(?:x|X)[0-9a-fA-F_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b", "captures": { "1": { "name": "constant.numeric.hex.powershell" }, "2": { "name": "keyword.other.powershell" } } }, { "match": "(?\u003c!\\w)([-+]?(?:[0-9_]+)?\\.[0-9_]+(?:(?:e|E)[0-9]+)?(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b", "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } } }, { "match": "(?\u003c!\\w)([-+]?0(?:b|B)[01_]+(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b", "captures": { "1": { "name": "constant.numeric.octal.powershell" }, "2": { "name": "keyword.other.powershell" } } }, { "match": "(?\u003c!\\w)([-+]?[0-9_]+(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b", "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } } }, { "match": "(?\u003c!\\w)([-+]?[0-9_]+\\.(?:e|E)(?:[0-9_])?+(?:F|f|D|d|M|m)?)((?i:[kmgtp]b)?)\\b", "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } } }, { "match": "(?\u003c!\\w)([-+]?[0-9_]+[\\.]?(?:F|f|D|d|M|m))((?i:[kmgtp]b)?)\\b", "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } } }, { "match": "(?\u003c!\\w)([-+]?[0-9_]+[\\.]?(?:U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[kmgtp]b)?)\\b", "captures": { "1": { "name": "constant.numeric.integer.powershell" }, "2": { "name": "keyword.other.powershell" } } } ] }, "scriptblock": { "name": "meta.scriptblock.powershell", "begin": "\\{", "end": "\\}", "patterns": [ { "include": "$self" } ], "beginCaptures": { "0": { "name": "punctuation.section.braces.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.section.braces.end.powershell" } } }, "type": { "begin": "\\[", "end": "\\]", "patterns": [ { "name": "storage.type.powershell", "match": "(?!\\d+|\\.)(?:\\p{L}|\\p{N}|\\.)+" }, { "include": "$self" } ], "beginCaptures": { "0": { "name": "punctuation.section.bracket.begin.powershell" } }, "endCaptures": { "0": { "name": "punctuation.section.bracket.end.powershell" } } }, "variable": { "patterns": [ { "match": "(\\$)(?i:(False|Null|True))\\b", "captures": { "0": { "name": "constant.language.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" } } }, { "match": "(\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?\\b", "captures": { "0": { "name": "support.constant.variable.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } } }, { "match": "(\\$)(?i:(\\$|\\^|\\?|_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?\\b", "captures": { "0": { "name": "support.constant.automatic.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } } }, { "match": "(\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?\\b", "captures": { "0": { "name": "variable.language.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } } }, { "match": "(?i:(\\$|@)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?", "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "storage.modifier.scope.powershell" }, "4": { "name": "variable.other.member.powershell" } } }, { "match": "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?", "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "punctuation.section.braces.begin.powershell" }, "3": { "name": "storage.modifier.scope.powershell" }, "5": { "name": "punctuation.section.braces.end.powershell" }, "6": { "name": "variable.other.member.powershell" } } }, { "match": "(?i:(\\$|@)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?", "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "support.variable.drive.powershell" }, "4": { "name": "variable.other.member.powershell" } } }, { "match": "(?i:(\\$)(\\{)((?:\\p{L}|\\d|_)+:)?([^}]*[^}`])(\\}))((?:\\.(?:\\p{L}|\\d|_)+)*\\b)?", "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "punctuation.section.braces.begin.powershell" }, "3": { "name": "support.variable.drive.powershell" }, "5": { "name": "punctuation.section.braces.end.powershell" }, "6": { "name": "variable.other.member.powershell" } } } ] }, "variableNoProperty": { "patterns": [ { "match": "(\\$)(?i:(False|Null|True))\\b", "captures": { "0": { "name": "constant.language.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" } } }, { "match": "(\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))\\b", "captures": { "0": { "name": "support.constant.variable.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } } }, { "match": "(\\$)(?i:(\\$|\\^|\\?|_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This))\\b", "captures": { "0": { "name": "support.variable.automatic.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } } }, { "match": "(\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))\\b", "captures": { "0": { "name": "variable.language.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "3": { "name": "variable.other.member.powershell" } } }, { "match": "(?i:(\\$|@)(global|local|private|script|using|workflow):((?:\\p{L}|\\d|_)+))", "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "storage.modifier.scope.powershell" }, "4": { "name": "variable.other.member.powershell" } } }, { "match": "(?i:(\\$)(\\{)(global|local|private|script|using|workflow):([^}]*[^}`])(\\}))", "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "storage.modifier.scope.powershell" }, "4": { "name": "keyword.other.powershell" }, "5": { "name": "variable.other.member.powershell" } } }, { "match": "(?i:(\\$)((?:\\p{L}|\\d|_)+:)?((?:\\p{L}|\\d|_)+))", "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "support.variable.drive.powershell" }, "4": { "name": "variable.other.member.powershell" } } }, { "match": "(?i:(\\$)(\\{)((?:\\p{L}|\\d|_)+:)?([^}]*[^}`])(\\}))", "captures": { "0": { "name": "variable.other.readwrite.powershell" }, "1": { "name": "punctuation.definition.variable.powershell" }, "2": { "name": "punctuation.section.braces.begin" }, "3": { "name": "support.variable.drive.powershell" }, "5": { "name": "punctuation.section.braces.end" } } } ] } } }