Files
CMLeonOS/shell/Commands/User/HostnameCommand.cs

31 lines
902 B
C#
Raw Permalink Normal View History

2026-02-04 21:53:11 +08:00
using System;
2026-02-08 01:22:08 +08:00
using System.Collections.Generic;
using CMLeonOS;
2026-02-04 21:53:11 +08:00
namespace CMLeonOS.Commands.User
{
public static class HostnameCommand
{
public static void ProcessHostnameCommand(string args, CMLeonOS.UserSystem userSystem, Action<string> showError)
{
if (string.IsNullOrEmpty(args))
{
2026-02-08 01:22:08 +08:00
var commandInfos = new List<UsageGenerator.CommandInfo>
{
new UsageGenerator.CommandInfo
{
Command = "<new_hostname>",
Description = "Set new hostname",
IsOptional = false
}
};
showError(UsageGenerator.GenerateUsage("hostname", commandInfos));
2026-02-04 21:53:11 +08:00
return;
}
userSystem.ProcessHostnameCommand(args);
}
}
}