Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rosenkolev/devops-targets
https://github.com/rosenkolev/devops-targets
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rosenkolev/devops-targets
- Owner: rosenkolev
- License: mit
- Created: 2021-07-06T08:19:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-28T17:07:52.000Z (10 months ago)
- Last Synced: 2024-09-19T03:11:49.767Z (4 months ago)
- Language: C#
- Size: 122 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.TERMINAL.md
- License: LICENSE
Awesome Lists containing this project
README
# DevOpsTargets.Terminal
**This is a wrapper of the native OS terminal that can execute many commands and track command result.**
Example
```csharp
using DevOps.Terminal.Terminals;
// ...
TerminalSingleton.DefaultTerminal.Exec(
TerminalCommand.CreateParse("echo test"));// pipe
TerminalSingleton.DefaultTerminal.Exec(
TerminalCommand.Cd("/src") &&
TerminalCommand.CreateParse("ls .") &&
TerminalCommand.CreateParse("ping ..."));TerminalSingleton.DefaultTerminal.Exec(
TerminalCommand.Cd("/src") &&
TerminalCommand.CreateParse("ls .") &&
TerminalCommand.CreateParse("ping ..."));var result = TerminalSingleton.DefaultTerminal.ExecuteCommand(
new [] { "dotnet", "test" });// result.ExitCode == 0
```