Skip to content

Commit 7cd8802

Browse files
committed
Merge pull request #96 from vors/bugfixes
Revert to the version 2.0.0 'foo.exe' reconginition. Fix for #87 and #95
2 parents b2202ae + 705866a commit 7cd8802

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Support/PowershellSyntax.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
</dict>
241241
<dict>
242242
<key>match</key>
243-
<string>(?i:([\S&amp;&amp;[^&lt;&gt;"/\|?*]])+)(?i:\.(?i:exe|cmd|bat|ps1))</string>
243+
<string>(?i:[a-z][a-z0-9]+-?[a-z][a-z0-9]+)(?i:\.(?i:exe|cmd|bat|ps1))</string>
244244
<key>name</key>
245245
<string>support.function.powershell</string>
246246
</dict>

tests/samples/test-file.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,15 @@ function Get-MemberSignature {
5555
}
5656
}
5757

58+
foo "$(x).exe"
59+
5860
function echo([string]$text) {
5961
write-host $text
6062
}
6163

64+
$file = join-path $env:SystemDrive "$([System.io.path]::GetRandomFileName()).ps1"
65+
$ScriptBlock | Out-File $file -Force
66+
6267
# declarations should be consistent
6368
function foo.bar() {}
6469
Function foo() {}

0 commit comments

Comments
 (0)