mirror of
https://github.com/tonytins/tomas.git
synced 2025-03-21 15:21:21 +00:00
Removed shutdown command, for now
This commit is contained in:
parent
a06f9ccc9f
commit
69fcc9c776
3 changed files with 3 additions and 18 deletions
|
@ -9,8 +9,7 @@ public class About : IProgram
|
||||||
{
|
{
|
||||||
public bool Run(IShell shell)
|
public bool Run(IShell shell)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"{ComConsts.NAME} v{ComConsts.VersionGit}{Environment.NewLine}"
|
Console.WriteLine($"TOMAS v{ComConsts.VersionGit} is a hobby operating system written in C# using the COSMOS framework.{Environment.NewLine}Commands:");
|
||||||
+ "TOMAS (Tony's Managed Operating System) is a operating system written in C# using the COSMOS framework.");
|
|
||||||
var progs = shell.Programs;
|
var progs = shell.Programs;
|
||||||
foreach (var commands in progs.Keys)
|
foreach (var commands in progs.Keys)
|
||||||
Console.WriteLine(commands);
|
Console.WriteLine(commands);
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Tomas.Kernel.Programs;
|
|
||||||
|
|
||||||
internal class Shutdown : IProgram
|
|
||||||
{
|
|
||||||
public bool Run(IShell shell)
|
|
||||||
{
|
|
||||||
Environment.Exit(Environment.ExitCode);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -9,13 +9,12 @@ public class Shell : IShell
|
||||||
{
|
{
|
||||||
const char SYMBOL = '$';
|
const char SYMBOL = '$';
|
||||||
|
|
||||||
public Dictionary<string, IProgram> Programs => new Dictionary<string, IProgram>()
|
public Dictionary<string, IProgram> Programs => new()
|
||||||
{
|
{
|
||||||
{"about", new About() },
|
{"about", new About() },
|
||||||
{"fensay", new FenSay() },
|
{"fensay", new FenSay() },
|
||||||
{"clear", new Clear() },
|
{"clear", new Clear() },
|
||||||
{"commands", new Commands() },
|
{"commands", new Commands() }
|
||||||
{"shutdown", new Shutdown() }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public string ReadLine
|
public string ReadLine
|
||||||
|
|
Loading…
Add table
Reference in a new issue