PowerShell / EditorSyntax

PowerShell syntax highlighting for editors (VS Code, Atom, SublimeText, TextMate, etc.) and GitHub!
MIT License
133 stars 45 forks source link

Discrepancy in Syntax coloring of some cmdlets in VSCode #42

Closed PrateekKumarSingh closed 6 years ago

PrateekKumarSingh commented 7 years ago

System Details


Name                           Value                                                                                                                                                                  
----                           -----                                                                                                                                                                  
PSVersion                      5.1.14393.693                                                                                                                                                          
PSEdition                      Desktop                                                                                                                                                                
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                
BuildVersion                   10.0.14393.693                                                                                                                                                         
CLRVersion                     4.0.30319.42000                                                                                                                                                        
WSManStackVersion              3.0                                                                                                                                                                    
PSRemotingProtocolVersion      2.3                                                                                                                                                                    
SerializationVersion           1.1.0.1                                                                                                                                                                

Issue Description

Some Cmdlets are not color coded like they are supposed to in the editor pane of VSCode with default or any theme,

Cmdlets with issue - Tee-Object, Where-Object, Sort-object, could be more

image

image

A catch here could be all these cmdlets with coloring issues have an Alias same as the "Verb" in the Verb-Noun Syntax of the cmdlet, like Sort for Sort-Object

image

Run below one liner from vs code and see the difference in color of some cmdlets -

gcm|% name|?{$_ -like "*-*"} >TestFile.ps1;code .\TestFile.ps1
pcgeek86 commented 7 years ago

I can confirm that Sort-Object is not properly being highlighted.

screen shot 2017-04-17 at 8 38 38 am

Cheers, Trevor Sullivan

MovGP0 commented 7 years ago

Duplicate of #39

omniomi commented 6 years ago

This is resolved as of the latest commit to master.