Handle default help functionality

This commit is contained in:
Matt Nadareski
2025-10-06 07:19:23 -04:00
parent 0c3373e9f0
commit 94ac68e5a0

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using SabreTools.CommandLine.Features;
using SabreTools.CommandLine.Inputs;
namespace SabreTools.CommandLine
@@ -906,6 +907,18 @@ namespace SabreTools.CommandLine
return false;
}
// Handle default help functionality
if (topLevel is Help helpFeature)
{
helpFeature.ProcessArgs(args, 0, this);
return true;
}
else if (topLevel is HelpExtended helpExtFeature)
{
helpExtFeature.ProcessArgs(args, 0, this);
return true;
}
// Now verify that all other flags are valid
if (!feature.ProcessArgs(args, 1))
{