-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
Option to use Pager to display help text #216
Conversation
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.
Suggested slightly different naming. Don't worry about adding tests, this seems straightforward.
Also changed ShowHelp() to refer to UsePagerForHelpText instead Co-Authored-By: mpipo <themelo64@gmail.com>
Once this build completes https://dev.azure.com/natemcmaster/github/_build/results?buildId=160, there should be a daily build of this package published here: https://myget.org/feed/natemcmaster/package/nuget/McMaster.Extensions.CommandLineUtils I'm going to wait 2 weeks to see if any other PRs come in for patch changes before releasing this to nuget.org |
Nice... I was getting annoyed of that pager popping up all time for help. Why not making it false by default? It's the first time I see such behaviour in a cli. |
You're right, not many programs have a similar feature, but I didn't want to change the default behaviour (of using the pager) or make assumptions about what people use/like. The option's there now though 😃 |
@mpipo indeed... well.. technically not there yet... until new version is released 😄 |
Hello,
This commit makes using a Pager to display help text optional.
HelpUsePager is initialized to true as to not break default behaviour.
Re: Test - I'm not sure how to write a test for this since the value is always initialized and
ShowHelp
then refers to that value.Assert.True(app.HelpUsePager)
?