helje5/shell
Module exposing Unix command line tools as Swift 5 @dynamicCallable functions
Sample tool
The regular Swift Package Manager setup process:
mkdir ShellConsumerTest && cd ShellConsumerTest
swift package init --type executableSample main.swift:
import Shell
print(shell.host("zeezide.de"))Sample Package.swift:
// swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "ShellConsumerTest",
dependencies: [
.package(url: "https://github.com/AlwaysRightInstitute/Shell.git",
from: "0.1.0"),
],
targets: [
.target(name: "ShellConsumerTest", dependencies: [ "Shell" ]),
]
)Remember to add the dependency in two places. WET is best!
swift runandswift testpatch the$PATHto just/usr/bin. You may want to run the binary directly to make lookup work properly.
For this to work, you need to have Swift 5+ installed.
Links
Who
Brought to you by ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.
Package Metadata
Repository: helje5/shell
Default branch: master
README: README.md