From 69fcc9c77653b21f4b3b234cefd69fb6f9fdd7b0 Mon Sep 17 00:00:00 2001 From: Tony Bark Date: Fri, 6 Jan 2023 19:45:27 -0500 Subject: [PATCH] Removed shutdown command, for now --- src/Tomas.Kernal/Programs/About.cs | 3 +-- src/Tomas.Kernal/Programs/Shutdown.cs | 13 ------------- src/Tomas.Kernal/Shell.cs | 5 ++--- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 src/Tomas.Kernal/Programs/Shutdown.cs diff --git a/src/Tomas.Kernal/Programs/About.cs b/src/Tomas.Kernal/Programs/About.cs index 5ec9dad..df54f76 100644 --- a/src/Tomas.Kernal/Programs/About.cs +++ b/src/Tomas.Kernal/Programs/About.cs @@ -9,8 +9,7 @@ public class About : IProgram { public bool Run(IShell shell) { - Console.WriteLine($"{ComConsts.NAME} v{ComConsts.VersionGit}{Environment.NewLine}" - + "TOMAS (Tony's Managed Operating System) is a operating system written in C# using the COSMOS framework."); + Console.WriteLine($"TOMAS v{ComConsts.VersionGit} is a hobby operating system written in C# using the COSMOS framework.{Environment.NewLine}Commands:"); var progs = shell.Programs; foreach (var commands in progs.Keys) Console.WriteLine(commands); diff --git a/src/Tomas.Kernal/Programs/Shutdown.cs b/src/Tomas.Kernal/Programs/Shutdown.cs deleted file mode 100644 index e083530..0000000 --- a/src/Tomas.Kernal/Programs/Shutdown.cs +++ /dev/null @@ -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; - } -} diff --git a/src/Tomas.Kernal/Shell.cs b/src/Tomas.Kernal/Shell.cs index 17837aa..f098690 100644 --- a/src/Tomas.Kernal/Shell.cs +++ b/src/Tomas.Kernal/Shell.cs @@ -9,13 +9,12 @@ public class Shell : IShell { const char SYMBOL = '$'; - public Dictionary Programs => new Dictionary() + public Dictionary Programs => new() { {"about", new About() }, {"fensay", new FenSay() }, {"clear", new Clear() }, - {"commands", new Commands() }, - {"shutdown", new Shutdown() } + {"commands", new Commands() } }; public string ReadLine