-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Implement a completion for View parameter of format cmdlets #14513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What type do these vars represent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed there var.
…letionCompleters.cs Co-authored-by: Robert Holt <rjmholt@gmail.com>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.