Scarab/src/Program.bf

42 lines
678 B
Beef
Raw Normal View History

2025-02-17 12:44:15 +01:00
namespace Scarab;
using System;
using System.IO;
using System.Diagnostics;
using System.Interop;
class Program
{
2025-03-29 10:36:49 +01:00
private static bool _shouldClose = false;
2025-02-17 12:44:15 +01:00
///Close the program once the execution of the current command is finished
2025-03-29 10:36:49 +01:00
public static void Close() => _shouldClose = true;
2025-02-17 12:44:15 +01:00
public static void Main(String[] args)
{
2025-03-29 10:36:49 +01:00
2025-02-17 12:44:15 +01:00
while(!_shouldClose)
{
DrawCursor();
var input = Console.ReadLine(.. scope .());
if(input == "exit")
Close();
}
/*
- Load Configuration
- Read Input
- Process Command
*/
}
private static void DrawCursor()
{
var dir = Directory.GetCurrentDirectory(.. scope .());
Console.Write(scope $"{dir}>");
}
}