New Commands & piped interpreter!
This commit is contained in:
29
TermEngine/Commands/GreetCommand.cs
Normal file
29
TermEngine/Commands/GreetCommand.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using TermApp.Core;
|
||||
|
||||
namespace TermApp.Commands
|
||||
{
|
||||
|
||||
public class GreetCommand : ICommand
|
||||
{
|
||||
public string Name => "greet";
|
||||
public string Description => "greets someone.. args [name]";
|
||||
|
||||
public void Execute(string[] args, string input = null)
|
||||
{
|
||||
|
||||
if (args.Length == 0)
|
||||
{
|
||||
|
||||
Console.WriteLine(Description);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
Console.WriteLine("Greetings , " + args[0]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user