统一Usage

This commit is contained in:
2026-02-08 01:22:08 +08:00
parent 85fa99f7bd
commit 4abc6e96cf
10 changed files with 471 additions and 31 deletions

View File

@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using CMLeonOS;
namespace CMLeonOS.Commands.Script
{
@@ -9,7 +11,17 @@ namespace CMLeonOS.Commands.Script
{
if (string.IsNullOrEmpty(args))
{
showError("Usage: com <filename.cm>");
var commandInfos = new List<UsageGenerator.CommandInfo>
{
new UsageGenerator.CommandInfo
{
Command = "<filename.cm>",
Description = "Execute command file",
IsOptional = false
}
};
showError(UsageGenerator.GenerateUsage("com", commandInfos));
return;
}