A library for simplifying task execution in Swift.
Use the >
custom operator to execute commands:
let result = >"true"
print(result.result) // 0
print(result.stdout) // ""
You can also create pipes using '|' custom operator:
let result = >"ls"|["grep", ".md$"]
print(result.stdout) // "README.md"
And pipe commands into a closure:
let result = >["ls", "README.md"]|{ String(count($0)) }
print(result.stdout) // "9"
The tests require xctester, install it via Homebrew:
$ brew tap neonichu/formulae
$ brew install xctester
and run the tests:
$ make test