Skip to content

Commit 5442748

Browse files
Ratchaphon Manosuthinatemcmaster
authored andcommitted
Option to use Pager to display help text (#216)
Co-Authored-By: mpipo <[email protected]>
1 parent 79c41bc commit 5442748

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/CommandLineUtils/CommandLineApplication.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ public string Name
169169
/// </summary>
170170
public List<CommandOption> Options { get; private set; }
171171

172+
/// <summary>
173+
/// Whether a Pager should be used to display help text.
174+
/// </summary>
175+
public bool UsePagerForHelpText { get; set; } = true;
176+
172177
/// <summary>
173178
/// All names by which the command can be referenced. This includes <see cref="Name"/> and an aliases added in <see cref="AddName"/>.
174179
/// </summary>
@@ -839,7 +844,7 @@ public virtual void ShowHint()
839844
/// <summary>
840845
/// Show full help.
841846
/// </summary>
842-
public void ShowHelp() => ShowHelp(usePager: true);
847+
public void ShowHelp() => ShowHelp(usePager: UsePagerForHelpText);
843848

844849
/// <summary>
845850
/// Show full help.

0 commit comments

Comments
 (0)