Skip to content

Provides a simplified interface for running shell commands using the async/await pattern.

Notifications You must be signed in to change notification settings

1hdn/SimpleShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleShell

SimpleShell provides a simplified interface for running shell commands using the async/await pattern.

ICommandResult result = await Command.Run("echo hello");

CommandErrorType errorType = result.ErrorType;  // CommandErrorType.None
int exitCode = result.ExitCode;                 // 0
string error = result.StandardError;            // string.Empty
string output = result.StandardOutput;          // "hello"

The Command.Run method is best suited for simple shell commands like executing a script or starting a program. Each invocation of Command.Run starts a new process and returns when the process has exited.

If you need to interact with a script or program (like sending input based on output) this is not the right tool for the job.

SimpleShell is available as a NuGet package for .NET Standard 2.0.

About

Provides a simplified interface for running shell commands using the async/await pattern.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages