Change parameters order in Get-Help and help in order to get first -Full and then -Functionality when using Get-Help -Fu<tab> and help -Fu<tab>.#7370
Conversation
…ull and then -Functionality when using Get-Help -Fu<tab> and help -Fu<tab>.
| /// </summary> | ||
| /// <value></value> | ||
| [Parameter] | ||
| public string[] Component { get; set; } = null; |
There was a problem hiding this comment.
Please remove initialization - null is default. Below too.
| /// <summary> | ||
| /// List of Component's to search on. | ||
| /// </summary> | ||
| /// <value></value> |
There was a problem hiding this comment.
Please remove line /// <value></value>. Below too.
| public string Parameter { set; get; } | ||
|
|
||
| /// <summary> | ||
| /// List of Component's to search on. |
There was a problem hiding this comment.
Public comment for property should start with "Gets and sets ...". Below too.
|
|
||
| It 'Should first suggest -Full and then -Functionalty when using Get-Help -Fu<tab>' -skip { | ||
| $res = TabExpansion2 -inputScript 'Get-Help -Fu' -cursorColumn 'Get-Help -Fu'.Length | ||
| $res.CompletionMatches[0].CompletionText | Should -Be '-Full' |
There was a problem hiding this comment.
Please use -BeExactly for strings. Below too.
| $res.CompletionMatches[1].CompletionText | Should -Be '-Functionality' | ||
| } | ||
|
|
||
| It 'Should first suggest -Full and then -Functionalty when using help -Fu<tab>' -skip { |
There was a problem hiding this comment.
Typo (missing i): Functionalty -> Functionality
| $res.CompletionMatches[0].CompletionText | Should -Be 'namespace' | ||
| } | ||
|
|
||
| It 'Should first suggest -Full and then -Functionalty when using Get-Help -Fu<tab>' -skip { |
There was a problem hiding this comment.
Typo (missing i): Functionalty -> Functionality
|
Please see #7371 (comment) for why I think this problem should be tackled fundamentally differently. |
iSazonov
left a comment
There was a problem hiding this comment.
I do not know when we will have a more general solution and so far this is LGTM.
|
@iSazonov: Understood, but my point was that the effort expended here could have gone toward fixing the problem fundamentally. |
|
@mklement0 I agree. And this is a very simple change. I think we will not be able to implement a more general solution until 6.1. So this decision will be welcome since it should not contradict a more general solution. |
|
@SteveL-MSFT Do you agree to merge the intermediate change? |
|
I'm fine taking this change as-is. @mklement0 Perhaps you can open a new issue to discuss the broader issue? |
Change parameters order in
Get-Helpcmdlet andhelpfunction in order to get first -Full and then -Functionality when usingGet-Help -Fu<tab>andhelp -Fu<tab>.Since -Full parameter is used much more frequently, than -Functionality it make sense to put it first when using tab completion.
Also, alphabetically, Full goes earlier than Functionality, that adds to the justification of the change.
Fix #7371
PR Summary
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests