From aaa3b78d341d21579fec07e6aae8e7f47ed8dc53 Mon Sep 17 00:00:00 2001 From: Kare Morstol Date: Mon, 9 Nov 2015 21:52:30 +0100 Subject: [PATCH] Readme: clarify how to set up a swift script file. --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0bbe60e..235230c 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,20 @@ An OS X Framework for command line scripting in Swift. It supports joining toget ## Usage -#### Commands - -Shell commands return readable streams, which can be read all at once with "read()" or read lazily (as in piece by piece) with "readSome()". The latter is useful for long texts. +Put this at the beginning of each script file: ```swift #!/usr/bin/env swiftshell import SwiftShell +``` + +#### Commands + +Shell commands return readable streams, which can be read all at once with "read()" or read lazily (as in piece by piece) with "readSome()". The latter is useful for long texts. + +```swift let result = run("some shell command").read() ```