Forrest 1.0.3

Forrest 1.0.3

测试已测试
Lang语言 SwiftSwift
许可证 MIT
发布最后发布2016年1月
SPM支持 SPM

Gruppio 维护。




Forrest 1.0.3

  • 作者:
  • Michele Gruppioni

alt Echolor

Analytics

Run Forrest Run

在 Swift 中运行 Shell 命令

Forrest 特点

  • 在您的 Swift 脚本中执行任何 Shell 命令
  • 非常易于使用
  • 轻松管道命令
  • <1000 行代码

示例

import Forrest

let forrest = Forrest()

// Get Current Directory
let pwd = forrest.run("pwd").stdout

// Piped Commands
let swiftFiles = forrest.run("ls -la | grep swift").stdout

包含示例

第一个示例是一个程序,该程序将列出您启动目录中的 Swift 文件。要运行此程序

git clone https://github.com/Gruppio/Run-Forrest-Run.git
cd Run-Forrest-Run/Examples/ListSwiftFiles
swift build
.build/debug/ListSwiftFiles

如何安装

您可以使用 SPM(Swift 包管理器)安装 Commander

Forrest 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中:

pod "Forrest"

作者

  • Michele Gruppioni 开发
  • 受 Swiftline 启发

许可证

Forrest 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。