tomas/src/Tomas.Kernel/Shell.cs
Tony Bark bdbd8572ea Migrated to .NET 6.0
- Switched to file-scoped namespaces
- Enabled Implicit Usings and Nullable

Kernal was migrated too but is unusable, at the moment. Stick with developing or testing from the terminal emulator.
2021-11-22 17:48:50 -05:00

31 lines
751 B
C#

// I license this project under the GPL 3.0 license.
// See the LICENSE file in the project root for more information.
using Tomas.Common.Programs;
using Tomas.Interface;
using Tomas.Kernel.Programs;
using Sys = Cosmos.System;
namespace Tomas.Kernel;
public class Shell : IShell
{
const char SYMBOL = '$';
public Dictionary<string, IProgram> Programs => new Dictionary<string, IProgram>()
{
{"about", new About()},
{"fensay", new FenSay()},
{"clear", new Clear()},
{"commands", new Commands()}
};
public string ReadLine
{
get
{
Console.Write(SYMBOL);
var readl = Console.ReadLine();
return readl;
}
}
}