BadScript 2
Loading...
Searching...
No Matches
BadChangeDirectoryTerminalCommand.cs
Go to the documentation of this file.
5
7{
8 public BadClearConsoleTerminalCommand() : base("Clears the Console", "clear") { }
9 public override Task Run(BadReplContext context, string[] args)
10 {
11 context.Console.Clear();
12 return Task.CompletedTask;
13 }
14}
16{
17 public BadChangeDirectoryTerminalCommand() : base("Changes the Current Working Directory", "cd") { }
18 public override Task Run(BadReplContext context, string[] args)
19 {
20 if (args.Length == 0)
21 {
22 context.Console.WriteLine(context.FileSystem.GetCurrentDirectory());
23 }
24 else
25 {
26 string path = args[0];
27 context.FileSystem.SetCurrentDirectory(path);
28 }
29 return Task.CompletedTask;
30 }
31}
Contains the 'html' console command implementation.
Contains the 'html' console command implementation.
Contains the 'settings' console command implementation.