Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PowerShell.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ contexts:
captures:
1: punctuation.definition.keyword.powershell
# Flags/Options/Parameters
- match: \B([-/])\p{L}(?:[\w-]*\w)?
- match: \B(--?|[/+])\p{L}(?:[\w-]*\w)?
scope: variable.parameter.option.powershell
captures:
1: punctuation.definition.parameter.powershell
Expand Down
11 changes: 11 additions & 0 deletions Tests/syntax_test_PowerShell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ throw "Do not run this file!"
# ^^^ keyword.control
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.unquoted - constant - variable - comment

& gnutool.exe -s 'short option' --long-option --very_long_option value +plus-option
#<- keyword.operator.other
# ^^^^^^^^^^^ variable.function
# ^ variable.parameter.option punctuation.definition.parameter
# ^ variable.parameter.option
# ^^ variable.parameter.option punctuation.definition.parameter
# ^^ variable.parameter.option punctuation.definition.parameter
# ^^^^^^^^^^^^^^^^ variable.parameter.option
# ^ variable.parameter.option punctuation.definition.parameter
# ^^^^^^^^^^^ variable.parameter.option

# Automatic variables
$_, $$, $^, $?
# <- punctuation.definition.variable
Expand Down