New Commands & piped interpreter!

This commit is contained in:
2025-07-09 00:22:59 +03:00
parent e3dc8d9d42
commit 8927637048
19 changed files with 239 additions and 76 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using TermApp.Core;
namespace TermApp
{
@@ -8,20 +9,21 @@ namespace TermApp
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("Input >");
string input = Console.ReadLine();
Console.Write($"[{lastCommand}] - Input >");
string input = Console.ReadLine() ?? throw new ArgumentException();
lastCommand = input;
if (string.IsNullOrWhiteSpace(input)) continue;
if (input.ToLower() == "exit") break;
if (input.ToLower() == "exit" || input.ToLower() == "e") break;
interpreter.Execute(input);