diff --git a/ShiftOS.Main/Terminal/Commands/Hello.cs b/ShiftOS.Main/Terminal/Commands/Hello.cs index efc9a9a..a826532 100644 --- a/ShiftOS.Main/Terminal/Commands/Hello.cs +++ b/ShiftOS.Main/Terminal/Commands/Hello.cs @@ -14,12 +14,10 @@ namespace ShiftOS.Main.Terminal.Commands public override string Usage { get; } = "Hello ."; public override bool Unlocked { get; set; } = false; - public override async void Run(params string[] parameters) + public override void Run(params string[] parameters) { string name = string.Join(" ", parameters); - WriteLine($"Oh, hello, {name}.", Color.Red); - string age = await Input("Hey, What's your age?"); - WriteLine($"Ok, so your name is {name} and your age {age}."); + WriteLine($"Oh, hello, {name}."); } } } diff --git a/ShiftOS.Main/Terminal/TerminalBackend.cs b/ShiftOS.Main/Terminal/TerminalBackend.cs index 9a5785f..02c9cd0 100644 --- a/ShiftOS.Main/Terminal/TerminalBackend.cs +++ b/ShiftOS.Main/Terminal/TerminalBackend.cs @@ -11,10 +11,9 @@ namespace ShiftOS.Main.Terminal public static class TerminalBackend { // The line below gets all the terminal commands in... well... the entire ShiftOS.Engine - public static IEnumerable instances = from t in Assembly.GetExecutingAssembly().GetTypes() - where t.IsSubclassOf(typeof(TerminalCommand)) - && t.GetConstructor(Type.EmptyTypes) != null - select Activator.CreateInstance(t) as TerminalCommand; + public static IEnumerable instances = Assembly.GetExecutingAssembly().GetTypes() + .Where(t => t.IsSubclassOf(typeof(TerminalCommand)) && t.GetConstructor(Type.EmptyTypes) != null) + .Select(t => Activator.CreateInstance(t) as TerminalCommand); public static List trm = new List(); public static int trmTopID = 0; diff --git a/ShiftOS.Main/Terminal/TerminalCommand.cs b/ShiftOS.Main/Terminal/TerminalCommand.cs index 4746e6c..5f313be 100644 --- a/ShiftOS.Main/Terminal/TerminalCommand.cs +++ b/ShiftOS.Main/Terminal/TerminalCommand.cs @@ -71,22 +71,22 @@ namespace ShiftOS.Main.Terminal /// Writes specified text in the terminal. /// /// The text to say before requesting text. - public virtual Task Input(string value = "") - { - ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID); - trm.Input(value); + //public virtual Task Input(string value = "") + //{ + // ShiftOS.Apps.Terminal trm = Array.Find(TerminalBackend.trm.ToArray(), w => w.TerminalID == TermID); + // trm.Input(value); - Task Input = new Task(() => - { - while (true) - if (trm.InputReturnText != "") break; + // Task Input = new Task(() => + // { + // while (true) + // if (trm.InputReturnText != "") break; - // The terminal has finally decided! + // // The terminal has finally decided! - return trm.InputReturnText; - }); - Input.Start(); - return Input; - } + // return trm.InputReturnText; + // }); + // Input.Start(); + // return Input; + //} } }