Develop a new command using the orbsh SDK
Sample: write a command relating to file system
First add the necessary imports:
using OrbitalShell.Component.CommandLine.CommandModel;
using OrbitalShell.Component.CommandLine.Parsing;
using OrbitalShell.Component.CommandLine.Processor;
using OrbitalShell.Component.CommandLine.Variable;
using OrbitalShell.Component.Console;
using OrbitalShell.Lib;
using OrbitalShell.Lib.Data;
using OrbitalShell.Lib.FileSystem;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using static OrbitalShell.Component.CommandLine.CommandLineReader.Interaction;
using static OrbitalShell.DotNetConsole;
using static OrbitalShell.Lib.FileSystem.FileSystem;
using static OrbitalShell.Lib.Str;
using sc = System.Console;
Then you can write a method and its body for your new command implementation:
//
If you build your code as a .net standard 2.1 class library, it will be usable as a module in Orbital Shell:
# orbsh
module -l MyCommands.dll