mirror of
https://github.com/SabreTools/SabreTools.CommandLine.git
synced 2026-09-21 14:14:58 +00:00
Handle default help functionality
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user