mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Split Headerer back out
This is in anticipation of making it a fully independent program. Currently, the only links to the rest of SabreTools are a few usability libraries that are mostly unnecessary. The main logic now lives as a separate library in SabreTools.Skippers.
This commit is contained in:
35
Headerer/Features/DisplayHelpDetailed.cs
Normal file
35
Headerer/Features/DisplayHelpDetailed.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using SabreTools.Help;
|
||||
|
||||
namespace Headerer.Features
|
||||
{
|
||||
internal class DisplayHelpDetailed : BaseFeature
|
||||
{
|
||||
public const string Value = "Help (Detailed)";
|
||||
|
||||
public DisplayHelpDetailed()
|
||||
{
|
||||
Name = Value;
|
||||
Flags.AddRange(["??", "hd", "help-detailed"]);
|
||||
Description = "Show this detailed help";
|
||||
_featureType = ParameterType.Flag;
|
||||
LongDescription = "Display a detailed help text to the screen.";
|
||||
}
|
||||
|
||||
public override bool ProcessArgs(string[] args, FeatureSet help)
|
||||
{
|
||||
// If we had something else after help
|
||||
if (args.Length > 1)
|
||||
{
|
||||
help.OutputIndividualFeature(args[1], includeLongDescription: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Otherwise, show generic help
|
||||
else
|
||||
{
|
||||
help.OutputAllHelp();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user