Skip to content

Sheller 4.0.0

Compare
Choose a tag to compare
@twitchax twitchax released this 19 Feb 08:36
· 55 commits to master since this release

This release changes:

  • The Sheller static class to Builder.
  • The Use method of the aforementioned static class to UseShell.

This release adds:

  • Succeeded to ICommandResult.
  • UseShell to IExecutable.
  • UseInputRequestHandler to IShell and IExecutable.

UseInputRequestHandler allows the developer to recognize when the executable is waiting for input, and allow the developer to respond to that required user input with text. It looks kind of like this.

await Builder
    .UseShell<Bash>()
    .UseExecutable($"read var1; echo $var1")
    .UseInputRequestHandler((stdout, stderr) =>
    {
        return Task.FromResult("hello_var1");
    })
    .ExecuteAsync();