-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppBuilder.cs
34 lines (29 loc) · 1.08 KB
/
AppBuilder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Micro.Commands;
using Spectre.Console.Cli;
namespace Micro;
public static class AppBuilder
{
public static CommandApp Build()
{
var app = new CommandApp();
app.Configure(config =>
{
config.SetApplicationVersion("1.0.0 \"Arc\"");
// config.PropagateExceptions();
// TODO: cp, find, rename, chat, editor
config.AddCommand<PrintWorkingDirectoryCommand>("pwd");
config.AddCommand<ListContentsCommand>("ls");
config.AddCommand<ChangeDirectoryCommand>("cd");
config.AddCommand<GetCommand>("get");
config.AddCommand<MakeDirectoryCommand>("mkdir");
config.AddCommand<RemoveCommand>("rm");
config.AddCommand<StatusCommand>("stat");
config.AddCommand<MoveCommand>("mv");
config.AddCommand<UsernameCommand>("whoami");
config.AddCommand<ClearCommand>("clear");
config.AddCommand<TouchCommand>("touch");
config.AddCommand<PutCommand>("put");
});
return app;
}
}