From b26b69f4734b9d74dc7f92950bb19388af1edda0 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Sun, 5 Nov 2023 19:35:50 -0800 Subject: [PATCH] enhancement: Aliasing Parse.CSharp to Parse-CSharp (re #558) --- Commands/Parsers/Parse-CSharp.ps.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Commands/Parsers/Parse-CSharp.ps.ps1 b/Commands/Parsers/Parse-CSharp.ps.ps1 index a79d7047c..02573e4a6 100644 --- a/Commands/Parsers/Parse-CSharp.ps.ps1 +++ b/Commands/Parsers/Parse-CSharp.ps.ps1 @@ -8,6 +8,7 @@ Parse function CSharp { Parse-CSharp -Source '"hello world";' #> [OutputType('Microsoft.CodeAnalysis.SyntaxTree')] + [Alias('Parse-CSharp')] param( # The source. Can be a string or a file. [Parameter(ValueFromPipeline)] @@ -40,7 +41,7 @@ Parse function CSharp { while ($accumulate.Count) { $dequeue = $accumulate.Dequeue() if ($total -gt 1) { - Write-Progress "Parsing PowerShell" " " -Id $script:LastProgressID -PercentComplete $( + Write-Progress "Parsing CSharp" " " -Id $script:LastProgressID -PercentComplete $( $count++ [Math]::Min($count / $total, 1) * 100 )