Implement a completion for View parameter of format cmdlets#14513
Implement a completion for View parameter of format cmdlets#14513rjmholt merged 25 commits intoPowerShell:masterfrom
Conversation
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
rjmholt
left a comment
There was a problem hiding this comment.
This change looks good, just have some style requests
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
What type do these vars represent?
There was a problem hiding this comment.
Removed there var.
…letionCompleters.cs Co-authored-by: Robert Holt <[email protected]>
b0fbafd to
2e0c109
Compare
|
Rebased to move to latest .Net. |
It 'Should complete $processList = Get-Process; $processList | <cmd>' -TestCases (
@{ cmd = 'Format-Table -View '; expected = "'R A M'", "Priority", "process", "ProcessModule", "ProcessWithUserName", "StartTime" },I still don't understand why this test only crashed on Windows. $a="'R A M'", "Priority", "process", "ProcessModule", "ProcessWithUserName", "StartTime"
$a | sort | write-verboseand did get: On all other platform CIs (Linux and MacOS) and on my local Windows system the result was as expected: I don't found why Sort-Object (and C# Array.Sort() - this I tested too) works so weird on Windows CI and add a workaround (sort expected list too). |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
rjmholt
left a comment
There was a problem hiding this comment.
The tests look good, but that quoting logic I think could be simpler
|
I opened new issue in .Net Runtime to get understanding about the weird sort behavior. |
|
dotnet/runtime#54472 (comment) Our CI-Windows uses old Windows version without full ICU support. The link above contains a workaround if we want to have a consistency on all Windows 10 systems and use ICU instead of Windows NLS. |
8d9b473 to
45ef40a
Compare
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
…letionCompleters.cs
|
@PoshChan please remind me in 4 hours |
|
@rjmholt, this is the reminder you requested 4 hours ago |
|
🎉 Handy links: |
PR Summary
Now works
dir | ft -View <Tab>.It has always been a problem to find out which format views exist.
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.