Files
Random-Project/TermEngine/Commands/HelpCommand.cs

36 lines
648 B
C#

using System;
using TermApp.Core;
namespace TermApp.Commands
{
public class HelpCommand : ICommand
{
private readonly CommandInterpreter _interpreter;
public HelpCommand(CommandInterpreter interpreter)
{
_interpreter = interpreter;
}
public string Name => "help";
public String Description => "Shows the Help pop Up";
public void Execute(string[] args, string input = null)
{
Console.WriteLine("Avaliable Commands:");
foreach (var cmd in _interpreter.GetAllCommands())
{
Console.WriteLine($"Command : {cmd.Name} | {cmd.Description}");
}
}
}
}