Skip to content

Commit 603bd30

Browse files
Added comment explaining HelpOption usage
1 parent 8b4d371 commit 603bd30

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/System.CommandLine.Subsystems/HelpSubsystem.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ namespace System.CommandLine;
1818
public class HelpSubsystem(IAnnotationProvider? annotationProvider = null)
1919
: CliSubsystem(HelpAnnotations.Prefix, SubsystemKind.Help, annotationProvider)
2020
{
21+
/// <summary>
22+
/// Gets the help option, which allows the user to customize
23+
/// </summary>
24+
/// <remarks>
25+
/// By design, the user can modify the help option but not replace it. This allows us to
26+
/// do the fastest possible lookup of whether help was called, and we aren't clear why
27+
/// the option would need to be replaced
28+
/// </remarks>
2129
public CliOption<bool> HelpOption { get; } = new CliOption<bool>("--help", ["-h"])
2230
{
2331
// TODO: Why don't we accept bool like any other bool option?

0 commit comments

Comments
 (0)