What is @msftrncs working on?
-
Statement based syntax highlighting for PowerShell in VS Code and other editors.
-
Alter PowerShell such that PSReadLine can highlight the
defaultkeyword of theswitchdefault condition.
| function Find-GitDirectory { | |
| param ( | |
| [string[]] $Path = '.', | |
| [switch] $Recurse | |
| ) | |
| $gciParams = @{ | |
| Recurse = $Recurse | |
| Force = $true |
| filter Format-Bytes { | |
| if ($_ -is [ValueType]) { | |
| $x = if (0 -ne $_) { | |
| [Math]::Min([int][Math]::Truncate([Math]::Log([Math]::Abs($_), 1kb)), 8) | |
| } else { | |
| 0 | |
| } | |
| if ($x -eq 0) { | |
| "$_ B" | |
| } else { |
Statement based syntax highlighting for PowerShell in VS Code and other editors.
Alter PowerShell such that PSReadLine can highlight the default keyword of the switch default condition.
| Set-PSReadLineOption -Colors @{ | |
| Command = 'DarkYellow' | |
| Comment = 'DarkGray' | |
| Keyword = 'Magenta' | |
| Member = 'White' | |
| Number = 'Cyan' | |
| Operator = 'Blue' | |
| Parameter = 'Yellow' | |
| String = 'Green' | |
| Type = 'Red' |
| using namespace System.Management.Automation.Language | |
| function CmdRequiresQuote ([string]$in) { | |
| [QuoteCheck]::CmdRequiresQuote($in, $false) | |
| } | |
| function CmdRequiresQuote ([string]$in, [bool]$IsExpandable = $false) { | |
| [Token[]]$_tokens = $null | |
| (_CommonRequiresQuote $in $IsExpandable ([ref]$_tokens)) -or | |
| -not $IsExpandable -and ($_tokens[0].Kind -in ( |