Compare commits
2 commits
dev
...
Initial-Pr
Author | SHA1 | Date | |
---|---|---|---|
cc40924831 | |||
5f736b062c |
5 changed files with 65 additions and 0 deletions
5
BeefProj.toml
Normal file
5
BeefProj.toml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
FileVersion = 1
|
||||||
|
|
||||||
|
[Project]
|
||||||
|
Name = "Scarab"
|
||||||
|
StartupObject = "Scarab.Program"
|
5
BeefSpace.toml
Normal file
5
BeefSpace.toml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
FileVersion = 1
|
||||||
|
Projects = {Scarab = {Path = "."}, Common = {Git = "https://code.booklordofthe.dev/Booklordofthedings/Common"}}
|
||||||
|
|
||||||
|
[Workspace]
|
||||||
|
StartupProject = "Scarab"
|
6
BeefSpace_Lock.toml
Normal file
6
BeefSpace_Lock.toml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
FileVersion = 1
|
||||||
|
|
||||||
|
[Locks.Common.Git]
|
||||||
|
URL = "https://code.booklordofthe.dev/Booklordofthedings/Common"
|
||||||
|
Tag = ""
|
||||||
|
Hash = "50abe7a88b4cbaae3273d6a2f855266c55b28ab1"
|
8
src/Commands/ScarabCommandAttribute.bf
Normal file
8
src/Commands/ScarabCommandAttribute.bf
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
namespace Scarab.Commands;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
[AttributeUsage(.Function)]
|
||||||
|
struct ScarabCommandAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
41
src/Program.bf
Normal file
41
src/Program.bf
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
namespace Scarab;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Interop;
|
||||||
|
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
private static bool _shouldClose = false;
|
||||||
|
|
||||||
|
///Close the program once the execution of the current command is finished
|
||||||
|
public static void Close() => _shouldClose = true;
|
||||||
|
|
||||||
|
public static void Main(String[] args)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
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}>");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue