v0.6.0-rc8: Add WithStandardInput() to Shell.Run()
Pre-release
Pre-release
·
726 commits
to master
since this release
What's New in v0.6.0-rc8
β¨ New Features
- WithStandardInput() - Added the ability to provide standard input to commands using the fluent builder API
π Usage Example
// Provide standard input to commands
var grepResult = await Shell.Run("grep")
.WithArguments("pattern")
.WithStandardInput("line1\nline2 with pattern\nline3")
.GetStringAsync();
// Combine with pipelines
var sorted = await Shell.Run("sort")
.WithStandardInput("banana\napple\ncherry")
.Pipe("head", "-2")
.GetLinesAsync();π§ Technical Details
- Added
WithStandardInput(string input)method toRunBuilder - Updated
CommandExtensions.Run()to accept optionalstandardInputparameter - Uses CliWrap's
WithStandardInputPipe()under the hood - Full test coverage for various stdin scenarios
Full Changelog: v0.6.0-rc7...v0.6.0-rc8