38 lines
922 B
C#
38 lines
922 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using TermApp.Core;
|
|
|
|
namespace TermApp
|
|
{
|
|
class Program
|
|
{
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
|
|
Console.WriteLine("Hello, Works!");
|
|
|
|
CommandInterpreter interpreter = new CommandInterpreter();
|
|
Console.WriteLine("Type help to see avaliable Commands :.) or type exit to quit");
|
|
string lastCommand = "Command Cache :)";
|
|
|
|
while (true)
|
|
{
|
|
|
|
Console.Write($"[{lastCommand}] - Input >");
|
|
string input = Console.ReadLine() ?? throw new ArgumentException();
|
|
lastCommand = input;
|
|
if (string.IsNullOrWhiteSpace(input)) continue;
|
|
if (input.ToLower() == "exit" || input.ToLower() == "e") break;
|
|
|
|
|
|
interpreter.Execute(input);
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|