-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Show usage (short) help if command line parameter is wrong #5780
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
|
CI AppVeyor temporary failed. |
|
|
||
| https://aka.ms/pscore6-docs | ||
| Type 'help' to get help.</value> | ||
| </data> |
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.
I don't like that we have a copy of the syntax. If we make updates in the future, we need to manually ensure that both sections are updated. Perhaps we can have the syntax (aka short help) just called HelpSyntax and the other one called ExtendedHelp. Now change the code where full help would have been shown shows HelpSyntax followed by ExtendedHelp.
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.
If ExtendedHelp maybe second - UsageHelp or ShortHelp?
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.
UsageHelp sounds fine to me
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.
Fixed.
| _hostUI.Write(_helpText); | ||
| if (_showExtendedHelp) | ||
| { | ||
| _hostUI.Write(ManagedEntranceStrings.ExtendedHelp); |
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.
Shouldn't this show both UsageHelp and ExtendedHelp?
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.
Line 396 already show UsageHelp.
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.
Got it!
PR Summary
Close #4986
pwsh -hPR Checklist
Note: Please mark anything not applicable to this PR
NA.[feature]if the change is significant or affectes feature testsWIP:to the beginning of the title and remove the prefix when the PR is ready.