@@ -224,9 +232,9 @@
@@ -241,7 +249,7 @@
Declaration
Swift
-
public let separator: Base.Iterator.Element
+
public let separator: Base.Element
@@ -251,9 +259,9 @@
@@ -295,7 +303,7 @@
Declaration
Swift
-
public init(_ base: Base, separator: Base.Iterator.Element, allowEmptySlices: Bool = false)
+
public init(_ base: Base, separator: Base.Element, allowEmptySlices: Bool = false)
@@ -378,7 +386,7 @@ a separator, should empty slices be emitted? Defaults to false.
diff --git a/docsets/SwiftShell.docset/Contents/Resources/Documents/Structs/PartialSourceLazySplitSequence.html b/docsets/SwiftShell.docset/Contents/Resources/Documents/Structs/PartialSourceLazySplitSequence.html
index be9e0b0..f039b82 100644
--- a/docsets/SwiftShell.docset/Contents/Resources/Documents/Structs/PartialSourceLazySplitSequence.html
+++ b/docsets/SwiftShell.docset/Contents/Resources/Documents/Structs/PartialSourceLazySplitSequence.html
@@ -14,7 +14,7 @@
@@ -40,6 +40,9 @@
MainContext
+
+ PrintedAsyncCommand
+
RunOutput
@@ -52,10 +55,10 @@
Global Variables
@@ -85,6 +88,9 @@
Process
+
+ Process
+
String
@@ -96,9 +102,6 @@
+(_:_:)
-
- ==(_:_:)
-
exit(_:file:line:)
@@ -118,23 +121,29 @@
open(forWriting:overwrite:encoding:)
- run(_:_:combineOutput:)
+ run(_:_:combineOutput:)
run(bash:combineOutput:)
- runAndPrint(_:_:)
+ runAndPrint(_:_:)
runAndPrint(bash:)
- runAsync(_:_:file:line:)
+ runAsync(_:_:file:line:)
runAsync(bash:file:line:)
+
+ runAsyncAndPrint(_:_:file:line:)
+
+
+ runAsyncAndPrint(bash:file:line:)
+
streams()
@@ -183,7 +192,7 @@
public struct PartialSourceLazySplitSequence <Base: Collection>: IteratorProtocol, LazySequenceProtocol where
- Base.Iterator.Element: Equatable,
+ Base.Element: Equatable,
Base.SubSequence: RangeReplaceableCollection
@@ -214,7 +223,7 @@
Declaration
Swift
-
public init(_ bases: @escaping () -> Base?, separator: Base.Iterator.Element)
+
public init(_ bases: @escaping () -> Base?, separator: Base.Element)
@@ -285,7 +294,7 @@ or nil if there are no more collections.
diff --git a/docsets/SwiftShell.docset/Contents/Resources/Documents/index.html b/docsets/SwiftShell.docset/Contents/Resources/Documents/index.html
index 4e81c79..5850f5d 100644
--- a/docsets/SwiftShell.docset/Contents/Resources/Documents/index.html
+++ b/docsets/SwiftShell.docset/Contents/Resources/Documents/index.html
@@ -13,7 +13,7 @@
@@ -39,6 +39,9 @@
MainContext
+
+ PrintedAsyncCommand
+
RunOutput
@@ -51,10 +54,10 @@
Global Variables
@@ -84,6 +87,9 @@
Process
+
+ Process
+
String
@@ -95,9 +101,6 @@
+(_:_:)
-
- ==(_:_:)
-
exit(_:file:line:)
@@ -117,23 +120,29 @@
open(forWriting:overwrite:encoding:)
- run(_:_:combineOutput:)
+ run(_:_:combineOutput:)
run(bash:combineOutput:)
- runAndPrint(_:_:)
+ runAndPrint(_:_:)
runAndPrint(bash:)
- runAsync(_:_:file:line:)
+ runAsync(_:_:file:line:)
runAsync(bash:file:line:)
+
+ runAsyncAndPrint(_:_:file:line:)
+
+
+ runAsyncAndPrint(bash:file:line:)
+
streams()
@@ -301,7 +310,7 @@
You can create a copy of your application’s context: let context = CustomContext(main), or create a new empty one: let context = CustomContext(). Everything is mutable, so you can set e.g. the current directory or redirect standard error to a file.
Main context
-
The global variable main is the Context for the application itself. In addition to the properties mentioned above it also has these:
+
The global variable main is the Context for the application itself. In addition to the properties mentioned above it also has these:
public var encoding: String.Encoding
@@ -348,7 +357,7 @@ The path to the application.
You can use let (input,output) = streams() to create a new pair of streams. What you write to input you can read from output.
-FileSmith’s WritableFile and ReadableFile are streams too, and can be used as stdin, stdout and stderror in SwiftShell Contexts, including main.
+FileSmith’s WritableFile and ReadableFile are streams too, and can be used as stdin, stdout and stderror in SwiftShell Contexts, including main.
WritableStream
When writing to a WritableStream you normally use .print which works exactly like Swift’s built-in print function:
@@ -404,9 +413,9 @@ The path to the application.
Commands
-All Contexts (CustomContext and main) implement CommandRunning, which means they can run commands using themselves as the Context. ReadableStream and String can also run commands, they use main as the Context and themselves as .stdin. As a shortcut you can just use run(...) instead of main.run(...)
+All Contexts (CustomContext and main) implement CommandRunning, which means they can run commands using themselves as the Context. ReadableStream and String can also run commands, they use main as the Context and themselves as .stdin. As a shortcut you can just use run(...) instead of main.run(...)
-There are three different ways of running a command:
+There are 4 different ways of running a command:
Run
The simplest is to just run the command, wait until it’s finished and return the results:
@@ -445,7 +454,7 @@ The path to the application.
try runAndPrint("executable", "arg")
-
This runs a command like in the terminal, where any output goes to the Context’s (main in this case) .stdout and .stderror respectively. If the executable could not be found, was inaccessible or not executable, or the command returned with an exit code other than zero, then runAndPrint will throw a CommandError.
+
This runs a command like in the terminal, where any output goes to the Context’s (main in this case) .stdout and .stderror respectively. If the executable could not be found, was inaccessible or not executable, or the command returned with an exit code other than zero, then runAndPrint will throw a CommandError.
The name may seem a bit cumbersome, but it explains exactly what it does. SwiftShell never prints anything without explicitly being told to.
Asynchronous
@@ -453,7 +462,7 @@ The path to the application.
// be notified when the command is finished.
}
command.stdout.onOutput { stdout in
-
// be notified when the command produces output.
+
// be notified when the command produces output (only on macOS).
}
// do something with ‘command’ while it is still running.
@@ -461,39 +470,47 @@ The path to the application.
try command.finish() // wait for it to finish.
-
runAsync launches a command and continues before it’s finished. It returns this:
-
/// Output from the 'runAsync' methods.
-public final class AsyncCommand {
- public let stdout: ReadableStream
+runAsync launches a command and continues before it’s finished. It returns AsyncCommand which contains this:
+ public let stdout: ReadableStream
public let stderror: ReadableStream
/// Is the command still running?
- public var isRunning: Bool
+ public var isRunning: Bool { get }
- /// Terminates command.
+ /// Terminates the command by sending the SIGTERM signal.
public func stop()
- /// Waits for command to finish.
- /// - returns: itself
- /// - throws: `CommandError.returnedErrorCode(command: String, errorcode: Int)` if the exit code is anything but 0.
- public func finish() throws -> AsyncCommand
+ /// Interrupts the command by sending the SIGINT signal.
+ public func interrupt()
+
+ /// Temporarily suspends a command. Call resume() to resume a suspended command.
+ public func suspend() -> Bool
+
+ /// Resumes a command previously suspended with suspend().
+ public func resume() -> Bool
+
+ /// Waits for this command to finish.
+ public func finish() throws -> Self
/// Waits for command to finish, then returns with exit code.
public func exitcode() -> Int
+ /// Waits for the command to finish, then returns why the command terminated.
+ /// - returns: `.exited` if the command exited normally, otherwise `.uncaughtSignal`.
+ public func terminationReason() -> Process.TerminationReason
+
/// Takes a closure to be called when the command has finished.
- /// - Parameter handler: A closure taking this AsyncCommand as input, returning nothing.
- /// - Returns: This AsyncCommand.
- public func onCompletion(_ handler: @escaping (AsyncCommand) -> Void) -> AsyncCommand
-}
+ public func onCompletion(_ handler: @escaping (AsyncCommand) -> Void) -> Self
You can process standard output and standard error, and optionally wait until it’s finished and handle any errors.
If you read all of command.stderror or command.stdout it will automatically wait for the command to close its streams (and presumably finish running). You can still call finish() to check for errors.
+
+runAsyncAndPrint does the same as runAsync, but prints any output directly and it’s return type PrintedAsyncCommand doesn’t have the .stdout and .stderror properties.
Parameters
-The 3 run functions above take 2 different types of parameters:
+The run* functions above take 2 different types of parameters:
(_ executable: String, _ args: Any …)
If the path to the executable is without any /, SwiftShell will try to find the full path using the which shell command, which searches the directories in the PATH environment variable in order.
@@ -520,16 +537,16 @@ The path to the application.
If the command provided to runAsync could not be launched for any reason the program will print the error to standard error and exit, as is usual in scripts. The runAsync("cmd").finish() method throws an error if the exit code of the command is anything but 0:
let command = runAsync("cmd", "-n", 245)
-// do something with command.stderror or command.stdoutCommandError
+// ...
do {
try command.finish()
-} catch CommandError.ReturnedErrorCode(let error) {
+} catch CommandError.returnedErrorCode(let error) {
// use error.command or error.errorcode
}
The runAndPrint command can also throw this error, in addition to this one if the command could not be launched:
-} catch CommandError.InAccessibleExecutable(let path) {
+} catch CommandError.inAccessibleExecutable(let path) {
// ‘path’ is the full path to the executable
}
@@ -603,7 +620,7 @@ The path to the application.
diff --git a/docsets/SwiftShell.docset/Contents/Resources/Documents/search.json b/docsets/SwiftShell.docset/Contents/Resources/Documents/search.json
index d3a669a..18b4969 100644
--- a/docsets/SwiftShell.docset/Contents/Resources/Documents/search.json
+++ b/docsets/SwiftShell.docset/Contents/Resources/Documents/search.json
@@ -1 +1 @@
-{"Structs/PartialSourceLazySplitSequence.html#/s:10SwiftShell30PartialSourceLazySplitSequenceVACyxGxSgyc_7ElementQz9separatortcfc":{"name":"init(_:separator:)","abstract":"Creates a lazy sequence by splitting a series of collections repeatedly, as if they were one collection.
","parent_name":"PartialSourceLazySplitSequence"},"Structs/PartialSourceLazySplitSequence.html#/s:10SwiftShell30PartialSourceLazySplitSequenceV4next03SubG0QzSgyF":{"name":"next()","abstract":"The contents of ‘bases’ up to the next occurrence of ‘separator’.
","parent_name":"PartialSourceLazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV9remaining03SubE0QzSgv":{"name":"remaining","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV9separator7ElementQzv":{"name":"separator","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV16allowEmptySlicesSbv":{"name":"allowEmptySlices","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceVACyxGx_7ElementQz9separatorSb16allowEmptySlicestcfc":{"name":"init(_:separator:allowEmptySlices:)","abstract":"Creates a lazy sequence by splitting a Collection repeatedly.
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV4next03SubE0QzSgyF":{"name":"next()","abstract":"The contents of ‘base’ up to the next occurrence of ‘separator’.
","parent_name":"LazySplitSequence"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV3envs10DictionaryVyS2SGv":{"name":"env","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV5stdinAA14ReadableStream_pv":{"name":"stdin","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV6stdoutAA14WritableStream_pv":{"name":"stdout","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV8stderrorAA14WritableStream_pv":{"name":"stderror","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV16currentdirectorySSv":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextVACycfc":{"name":"init()","abstract":"Creates a blank CustomContext where env and stdin are empty, stdout and stderror discard everything and","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextVAcA0D0_pcfc":{"name":"init(_:)","abstract":"
Creates an identical copy of another Context.
","parent_name":"CustomContext"},"Structs/CustomContext.html":{"name":"CustomContext","abstract":"Undocumented
"},"Structs/LazySplitSequence.html":{"name":"LazySplitSequence","abstract":"A sequence from splitting a Collection lazily.
"},"Structs/PartialSourceLazySplitSequence.html":{"name":"PartialSourceLazySplitSequence","abstract":"A sequence from splitting a series of Collections lazily, as if they were one Collection.
"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"Undocumented
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP10filehandleSo10FileHandleCv":{"name":"filehandle","abstract":"Undocumented
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP5writeySSF":{"name":"write(_:)","abstract":"Writes x to the stream.
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP5closeyyF":{"name":"close()","abstract":"Closes the stream. Must be called on non-file streams when finished writing,","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamPAAE5printySayypGd_SS9separatorSS10terminatortF":{"name":"print(_:separator:terminator:)","abstract":"
Writes the textual representations of the given items into the stream.","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamPAAE5writey10Foundation4DataV4data_tF":{"name":"write(data:)","abstract":"
Writes data to the stream.
","parent_name":"WritableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP10filehandleSo10FileHandleCv":{"name":"filehandle","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP8readSomeSSSgyF":{"name":"readSome()","abstract":"All the text the stream contains so far.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP4readSSyF":{"name":"read()","abstract":"
Reads everything at once.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5liness12LazySequenceVys03AnyG0VySSGGyF":{"name":"lines()","abstract":"Splits stream lazily into lines.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5writeyqd__z2to_ts010TextOutputD0Rd__lF":{"name":"write(to:)","abstract":"Writes the text in this stream to the given TextOutputStream.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5writeyAA08WritableD0_pz2to_tF":{"name":"write(to:)","abstract":"Writes the text in this stream to the given WritableStream.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE7contextAA7Context_pv":{"name":"context","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE12readSomeData10Foundation0G0VSgyF":{"name":"readSomeData()","abstract":"All the data the stream contains so far.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE8readData10Foundation0F0VyF":{"name":"readData()","abstract":"
Reads everything at once.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE8onOutputyyAaB_pcF":{"name":"onOutput(_:)","abstract":"handler will be called whenever there is new output available.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE14onStringOutputyySScF":{"name":"onStringOutput(_:)","abstract":"handler will be called whenever there is new text output available.
","parent_name":"ReadableStream"},"Protocols/Context.html#/s:10SwiftShell7ContextP3envs10DictionaryVyS2SGv":{"name":"env","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP5stdinAA14ReadableStream_pv":{"name":"stdin","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP6stdoutAA14WritableStream_pv":{"name":"stdout","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP8stderrorAA14WritableStream_pv":{"name":"stderror","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP16currentdirectorySSv":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextPAAE16debugDescriptionSSv":{"name":"debugDescription","abstract":"A textual representation of this instance, suitable for debugging.
","parent_name":"Context"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningP7contextAA7Context_pv":{"name":"context","abstract":"Undocumented
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE3runAA9RunOutputCSS4bash_Sb07combineG0tF":{"name":"run(bash:combineOutput:)","abstract":"Runs a bash shell command.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE8runAsyncAA0fC0CSS4bash_SS4fileSi4linetF":{"name":"runAsync(bash:file:line:)","abstract":"Run bash command and return before it is finished.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE11runAndPrintySS4bash_tKF":{"name":"runAndPrint(bash:)","abstract":"Run bash command and print output and errors.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE3runAA9RunOutputCSS_SayypGdSb07combineG0tF":{"name":"run(_:_:combineOutput:)","abstract":"Runs a command.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE8runAsyncAA0fC0CSS_SayypGdSS4fileSi4linetF":{"name":"runAsync(_:_:file:line:)","abstract":"Run executable and return before it is finished.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE11runAndPrintySS_SayypGdtKF":{"name":"runAndPrint(_:_:)","abstract":"Run executable and print output and errors.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html":{"name":"CommandRunning","abstract":"Can run commands.
"},"Protocols/Context.html":{"name":"Context","abstract":"Undocumented
"},"Protocols.html#/CommandRunning":{"name":"CommandRunning","abstract":"CommandRunning is not available on iOS, tvOS and watchOS.
"},"Protocols/ReadableStream.html":{"name":"ReadableStream","abstract":"A stream of text. Does as much as possible lazily.
"},"Protocols/WritableStream.html":{"name":"WritableStream","abstract":"An output stream, like standard output or a writeable file.
"},"Functions.html#/s:10SwiftShell3runAA9RunOutputCSS4bash_Sb07combineE0tF":{"name":"run(bash:combineOutput:)","abstract":"Runs a bash shell command.
"},"Functions.html#/s:10SwiftShell8runAsyncAA0D7CommandCSS4bash_SS4fileSi4linetF":{"name":"runAsync(bash:file:line:)","abstract":"Run bash command and return before it is finished.
"},"Functions.html#/s:10SwiftShell11runAndPrintySS4bash_tKF":{"name":"runAndPrint(bash:)","abstract":"Run bash command and print output and errors.
"},"Functions.html#/s:10SwiftShell4exits5NeverOx12errormessage_Si9errorcodeSS4fileSi4linetlF":{"name":"exit(errormessage:errorcode:file:line:)","abstract":"Print message to standard error and halt execution.
"},"Functions.html#/s:10SwiftShell4exits5NeverOs5Error_p_SS4fileSi4linetF":{"name":"exit(_:file:line:)","abstract":"Print error to standard error and halt execution.
"},"Functions.html#/s:10SwiftShell2eeoiSbAA12CommandErrorO_ADtF":{"name":"==(_:_:)","abstract":"Undocumented
"},"Functions.html#/s:10SwiftShell3runAA9RunOutputCSS_SayypGdSb07combineE0tF":{"name":"run(_:_:combineOutput:)","abstract":"Runs a command.
"},"Functions.html#/s:10SwiftShell8runAsyncAA0D7CommandCSS_SayypGdSS4fileSi4linetF":{"name":"runAsync(_:_:file:line:)","abstract":"Run executable and return before it is finished.
"},"Functions.html#/s:10SwiftShell11runAndPrintySS_SayypGdtKF":{"name":"runAndPrint(_:_:)","abstract":"Run executable and print output and errors.
"},"Functions.html#/s:10SwiftShell1poi10Foundation3URLVAE_SStF":{"name":"+(_:_:)","abstract":"Append file or directory url to directory url
"},"Functions.html#/s:10SwiftShell4openAA14ReadableStream_pSS_SS10FoundationE8EncodingV8encodingtKF":{"name":"open(_:encoding:)","abstract":"Open a file for reading, throw if an error occurs.
"},"Functions.html#/s:10SwiftShell4openAA14ReadableStream_p10Foundation3URLV_SSADE8EncodingV8encodingtKF":{"name":"open(_:encoding:)","abstract":"Open a file for reading, throw if an error occurs.
"},"Functions.html#/s:10SwiftShell4openAA14WritableStream_p10Foundation3URLV10forWriting_Sb9overwriteSSADE8EncodingV8encodingtKF":{"name":"open(forWriting:overwrite:encoding:)","abstract":"Open a file for writing, create it first if it doesn’t exist."},"Functions.html#/s:10SwiftShell4openAA14WritableStream_pSS10forWriting_Sb9overwriteSS10FoundationE8EncodingV8encodingtKF":{"name":"open(forWriting:overwrite:encoding:)","abstract":"
Open a file for writing, create it first if it doesn’t exist."},"Functions.html#/s:10SwiftShell7streamsAA14WritableStream_p_AA08ReadableE0_ptyF":{"name":"streams()","abstract":"
Creates a pair of streams. What is written to the 1st one can be read from the 2nd one.
"},"Extensions/LazyCollectionProtocol.html#/s:s22LazyCollectionProtocolP10SwiftShellsAARzs9Equatable7ElementRpzs0B08Elements_11SubSequenceRPzlE5splitAC0a5SplitJ0VyAHQzGAF9separator_Sb16allowEmptySlicestF":{"name":"split(separator:allowEmptySlices:)","abstract":"Creates a lazy sequence by splitting this Collection repeatedly.
","parent_name":"LazyCollectionProtocol"},"Extensions/String.html#/s:SS10SwiftShellE7contextAA7Context_pv":{"name":"context","abstract":"Undocumented
","parent_name":"String"},"Extensions/String.html#/s:SS10SwiftShellE5linesSaySSGyF":{"name":"lines()","abstract":"Split text into lines (as separated by newlines).
","parent_name":"String"},"Extensions/FileHandle.html#/nullDev":{"name":"nullDev","abstract":"Returns ’/dev/null’. ‘nullDevice’ has not been implemented yet in Swift Foundation.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE7nullDevABvZ":{"name":"nullDev","abstract":"Returns ’.nullDevice’. ‘nullDevice’ has not been implemented yet in Swift Foundation.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE8readSomeSSSgSS10FoundationE8EncodingV8encoding_tF":{"name":"readSome(encoding:)","abstract":"Read what is available, as a String.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE4readS2S10FoundationE8EncodingV8encoding_tF":{"name":"read(encoding:)","abstract":"Read to the end, as a String.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE5writeySS_SS10FoundationE8EncodingV8encodingtF":{"name":"write(_:encoding:)","abstract":"Undocumented
","parent_name":"FileHandle"},"Extensions/Process.html#/s:So7ProcessC10SwiftShellE15launchThrowablyyyKF":{"name":"launchThrowably()","abstract":"Launch process.
","parent_name":"Process"},"Extensions/Process.html#/s:So7ProcessC10SwiftShellE6finishyyKF":{"name":"finish()","abstract":"Wait until process is finished.
","parent_name":"Process"},"Extensions/Process.html":{"name":"Process"},"Extensions/FileHandle.html":{"name":"FileHandle"},"Extensions/String.html":{"name":"String","abstract":"Let Strings run commands using itself as stdin.
"},"Extensions/LazyCollectionProtocol.html":{"name":"LazyCollectionProtocol"},"Enums/FileError.html#/s:10SwiftShell9FileErrorO8notFoundACSS4path_tcACmF":{"name":"notFound","abstract":"Undocumented
","parent_name":"FileError"},"Enums/FileError.html#/s:10SwiftShell9FileErrorO05checkC0ySSKFZ":{"name":"checkFile(_:)","abstract":"Undocumented
","parent_name":"FileError"},"Enums/FileError.html#/s:s23CustomStringConvertibleP11descriptionSSv":{"name":"description","parent_name":"FileError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO08returnedD4CodeACSS7command_Si9errorcodetcACmF":{"name":"returnedErrorCode","abstract":"Exit code was not zero.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO22inAccessibleExecutableACSS4path_tcACmF":{"name":"inAccessibleExecutable","abstract":"Command could not be executed.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO9errorcodeSiv":{"name":"errorcode","abstract":"Exit code for this error.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:s23CustomStringConvertibleP11descriptionSSv":{"name":"description","parent_name":"CommandError"},"Enums/CommandError.html":{"name":"CommandError","abstract":"Error type for commands.
"},"Enums/FileError.html":{"name":"FileError","abstract":"Error type for file commands.
"},"Global Variables.html#/s:10SwiftShell4mainAA11MainContextCv":{"name":"main","abstract":"Undocumented
"},"Global Variables.html#/s:10SwiftShell5FilesSo11FileManagerCv":{"name":"Files","abstract":"The default FileManager
"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamC10filehandleSo0cD0Cv":{"name":"filehandle","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamC8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamCACSo0cD0C_SS10FoundationE8EncodingV8encodingtcfc":{"name":"init(_:encoding:)","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC10filehandleSo10FileHandleCv":{"name":"filehandle","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC7defaultACvZ":{"name":"default","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell14WritableStreamP5writeySSF":{"name":"write(_:)","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell14WritableStreamP5closeyyF":{"name":"close()","parent_name":"StdoutStream"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"The default character encoding used throughout SwiftShell.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC3envs10DictionaryVyS2SGv":{"name":"env","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC5stdinAA14ReadableStream_pv":{"name":"stdin","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC6stdoutAA14WritableStream_pv":{"name":"stdout","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC8stderrorAA14WritableStream_pv":{"name":"stderror","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC16currentdirectorySSv":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC13tempdirectorySSv":{"name":"tempdirectory","abstract":"The tempdirectory is unique each time a script is run and is created the first time it is used.","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC9argumentsSaySSGv":{"name":"arguments","abstract":"
The arguments this executable was launched with. Use main.path to get the path.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC4pathSSv":{"name":"path","abstract":"The path to the currently running executable. Will be empty in playgrounds.
","parent_name":"MainContext"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC6stdoutAA14ReadableStream_pv":{"name":"stdout","abstract":"Undocumented
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC8stderrorAA14ReadableStream_pv":{"name":"stderror","abstract":"Undocumented
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC9isRunningSbv":{"name":"isRunning","abstract":"Is the command still running?
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC4stopyyF":{"name":"stop()","abstract":"Terminates command.
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC6finishACyKF":{"name":"finish()","abstract":"Wait for this command to finish.
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC8exitcodeSiyF":{"name":"exitcode()","abstract":"Wait for command to finish, then return with exit code.
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC12onCompletionACyACcF":{"name":"onCompletion(_:)","abstract":"Takes a closure to be called when the command has finished.
","parent_name":"AsyncCommand"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC5errorAA12CommandErrorOSgv":{"name":"error","abstract":"The error from running the command, if any.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC6stdoutSSv":{"name":"stdout","abstract":"Standard output, trimmed of whitespace and newline if it is single-line.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC8stderrorSSv":{"name":"stderror","abstract":"Standard error, trimmed of whitespace and newline if it is single-line.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC8exitcodeSiv":{"name":"exitcode","abstract":"The exit code of the command. Anything but 0 means there was an error.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC9succeededSbv":{"name":"succeeded","abstract":"Checks if the exit code is 0.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC2aaoiA2C_ACyXKtFZ":{"name":"&&(_:_:)","abstract":"Run the first command, then the second one only if the first succeeded.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC2oooiA2C_ACyXKtFZ":{"name":"||(_:_:)","abstract":"Run the first command, then the second one only if the first failed.
","parent_name":"RunOutput"},"Classes/RunOutput.html":{"name":"RunOutput","abstract":"Output from a run command.
"},"Classes/AsyncCommand.html":{"name":"AsyncCommand","abstract":"Output from the ‘runAsync’ methods.
"},"Classes/MainContext.html":{"name":"MainContext","abstract":"Undocumented
"},"Classes/StdoutStream.html":{"name":"StdoutStream","abstract":"Singleton WritableStream used only for printing to stdout.
"},"Classes/FileHandleStream.html":{"name":"FileHandleStream","abstract":"Undocumented
"},"Classes.html":{"name":"Classes","abstract":"The following classes are available globally.
"},"Global Variables.html":{"name":"Global Variables","abstract":"The following global variables are available globally.
"},"Enums.html":{"name":"Enumerations","abstract":"The following enumerations are available globally.
"},"Extensions.html":{"name":"Extensions","abstract":"The following extensions are available globally.
"},"Functions.html":{"name":"Functions","abstract":"The following functions are available globally.
"},"Protocols.html":{"name":"Protocols","abstract":"The following protocols are available globally.
"},"Structs.html":{"name":"Structures","abstract":"The following structures are available globally.
"}}
\ No newline at end of file
+{"Structs/PartialSourceLazySplitSequence.html#/s:10SwiftShell30PartialSourceLazySplitSequenceVACyxGxSgyc_7ElementQz9separatortcfc":{"name":"init(_:separator:)","abstract":"Creates a lazy sequence by splitting a series of collections repeatedly, as if they were one collection.
","parent_name":"PartialSourceLazySplitSequence"},"Structs/PartialSourceLazySplitSequence.html#/s:10SwiftShell30PartialSourceLazySplitSequenceV4next03SubG0QzSgyF":{"name":"next()","abstract":"The contents of ‘bases’ up to the next occurrence of ‘separator’.
","parent_name":"PartialSourceLazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV9remaining03SubE0QzSgvp":{"name":"remaining","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV9separator7ElementQzvp":{"name":"separator","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV16allowEmptySlicesSbvp":{"name":"allowEmptySlices","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceVACyxGx_7ElementQz9separatorSb16allowEmptySlicestcfc":{"name":"init(_:separator:allowEmptySlices:)","abstract":"Creates a lazy sequence by splitting a Collection repeatedly.
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV4next03SubE0QzSgyF":{"name":"next()","abstract":"The contents of ‘base’ up to the next occurrence of ‘separator’.
","parent_name":"LazySplitSequence"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV3envs10DictionaryVyS2SGvp":{"name":"env","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV5stdinAA14ReadableStream_pvp":{"name":"stdin","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV6stdoutAA14WritableStream_pvp":{"name":"stdout","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV8stderrorAA14WritableStream_pvp":{"name":"stderror","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV16currentdirectorySSvp":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextVACycfc":{"name":"init()","abstract":"Creates a blank CustomContext where env and stdin are empty, stdout and stderror discard everything and","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextVAcA0D0_pcfc":{"name":"init(_:)","abstract":"
Creates an identical copy of another Context.
","parent_name":"CustomContext"},"Structs/CustomContext.html":{"name":"CustomContext","abstract":"Undocumented
"},"Structs/LazySplitSequence.html":{"name":"LazySplitSequence","abstract":"A sequence from splitting a Collection lazily.
"},"Structs/PartialSourceLazySplitSequence.html":{"name":"PartialSourceLazySplitSequence","abstract":"A sequence from splitting a series of Collections lazily, as if they were one Collection.
"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"Undocumented
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP10filehandleSo10FileHandleCvp":{"name":"filehandle","abstract":"Undocumented
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP5writeySSF":{"name":"write(_:)","abstract":"Writes x to the stream.
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP5closeyyF":{"name":"close()","abstract":"Closes the stream. Must be called on non-file streams when finished writing,","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamPAAE5printyypd_SS9separatorSS10terminatortF":{"name":"print(_:separator:terminator:)","abstract":"
Writes the textual representations of the given items into the stream.","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamPAAE5writey10Foundation4DataV4data_tF":{"name":"write(data:)","abstract":"
Writes data to the stream.
","parent_name":"WritableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP10filehandleSo10FileHandleCvp":{"name":"filehandle","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP8readSomeSSSgyF":{"name":"readSome()","abstract":"All the text the stream contains so far.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP4readSSyF":{"name":"read()","abstract":"
Reads everything at once.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5liness12LazySequenceVys03AnyG0VySSGGyF":{"name":"lines()","abstract":"Splits stream lazily into lines.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5writeyqd__z2to_ts010TextOutputD0Rd__lF":{"name":"write(to:)","abstract":"Writes the text in this stream to the given TextOutputStream.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5writeyAA08WritableD0_pz2to_tF":{"name":"write(to:)","abstract":"Writes the text in this stream to the given WritableStream.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE7contextAA7Context_pvp":{"name":"context","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE12readSomeData10Foundation0G0VSgyF":{"name":"readSomeData()","abstract":"All the data the stream contains so far.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE8readData10Foundation0F0VyF":{"name":"readData()","abstract":"
Reads everything at once.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE8onOutputyyAaB_pcF":{"name":"onOutput(_:)","abstract":"
Sets code to be executed whenever there is new output available.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE14onStringOutputyySScF":{"name":"onStringOutput(_:)","abstract":"Sets code to be executed whenever there is new text output available.
","parent_name":"ReadableStream"},"Protocols/Context.html#/s:10SwiftShell7ContextP3envs10DictionaryVyS2SGvp":{"name":"env","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP5stdinAA14ReadableStream_pvp":{"name":"stdin","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP6stdoutAA14WritableStream_pvp":{"name":"stdout","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP8stderrorAA14WritableStream_pvp":{"name":"stderror","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP16currentdirectorySSvp":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextPAAE16debugDescriptionSSvp":{"name":"debugDescription","abstract":"A textual representation of this instance, suitable for debugging.
","parent_name":"Context"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningP7contextAA7Context_pvp":{"name":"context","abstract":"Undocumented
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE3runAA9RunOutputCSS4bash_Sb07combineG0tF":{"name":"run(bash:combineOutput:)","abstract":"Runs a bash shell command.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE8runAsyncAA0fC0CSS4bash_SS4fileSi4linetF":{"name":"runAsync(bash:file:line:)","abstract":"Runs bash command and returns before it is finished.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE16runAsyncAndPrintAA07PrintedfC0CSS4bash_SS4fileSi4linetF":{"name":"runAsyncAndPrint(bash:file:line:)","abstract":"Runs bash command and returns before it is finished.","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE11runAndPrintySS4bash_tKF":{"name":"runAndPrint(bash:)","abstract":"
Runs bash command and prints output and errors.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE3runAA9RunOutputCSS_ypdSb07combineG0tF":{"name":"run(_:_:combineOutput:)","abstract":"Runs a command.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE8runAsyncAA0fC0CSS_ypdSS4fileSi4linetF":{"name":"runAsync(_:_:file:line:)","abstract":"Runs executable and returns before it is finished.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE16runAsyncAndPrintAA07PrintedfC0CSS_ypdSS4fileSi4linetF":{"name":"runAsyncAndPrint(_:_:file:line:)","abstract":"Runs executable and returns before it is finished.","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE11runAndPrintySS_ypdtKF":{"name":"runAndPrint(_:_:)","abstract":"
Runs executable and prints output and errors.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html":{"name":"CommandRunning","abstract":"Can run commands.
"},"Protocols/Context.html":{"name":"Context","abstract":"Undocumented
"},"Protocols.html#/CommandRunning":{"name":"CommandRunning","abstract":"CommandRunning is not available on iOS, tvOS and watchOS.
"},"Protocols/ReadableStream.html":{"name":"ReadableStream","abstract":"A stream of text. Does as much as possible lazily.
"},"Protocols/WritableStream.html":{"name":"WritableStream","abstract":"An output stream, like standard output or a writeable file.
"},"Functions.html#/s:10SwiftShell3runAA9RunOutputCSS4bash_Sb07combineE0tF":{"name":"run(bash:combineOutput:)","abstract":"Runs a bash shell command.
"},"Functions.html#/s:10SwiftShell8runAsyncAA0D7CommandCSS4bash_SS4fileSi4linetF":{"name":"runAsync(bash:file:line:)","abstract":"Runs bash command and returns before it is finished.
"},"Functions.html#/s:10SwiftShell16runAsyncAndPrintAA07PrintedD7CommandCSS4bash_SS4fileSi4linetF":{"name":"runAsyncAndPrint(bash:file:line:)","abstract":"Runs bash command and returns before it is finished."},"Functions.html#/s:10SwiftShell11runAndPrintySS4bash_tKF":{"name":"runAndPrint(bash:)","abstract":"
Runs bash command and prints output and errors.
"},"Functions.html#/s:10SwiftShell4exits5NeverOx12errormessage_Si9errorcodeSS4fileSi4linetlF":{"name":"exit(errormessage:errorcode:file:line:)","abstract":"Prints message to standard error and terminates the application.
"},"Functions.html#/s:10SwiftShell4exits5NeverOs5Error_p_SS4fileSi4linetF":{"name":"exit(_:file:line:)","abstract":"Prints error to standard error and terminates the application.
"},"Functions.html#/s:10SwiftShell3runAA9RunOutputCSS_ypdSb07combineE0tF":{"name":"run(_:_:combineOutput:)","abstract":"Runs a command.
"},"Functions.html#/s:10SwiftShell8runAsyncAA0D7CommandCSS_ypdSS4fileSi4linetF":{"name":"runAsync(_:_:file:line:)","abstract":"Runs executable and returns before it is finished.
"},"Functions.html#/s:10SwiftShell16runAsyncAndPrintAA07PrintedD7CommandCSS_ypdSS4fileSi4linetF":{"name":"runAsyncAndPrint(_:_:file:line:)","abstract":"Runs executable and returns before it is finished."},"Functions.html#/s:10SwiftShell11runAndPrintySS_ypdtKF":{"name":"runAndPrint(_:_:)","abstract":"
Runs executable and prints output and errors.
"},"Functions.html#/s:10SwiftShell1poi10Foundation3URLVAE_SStF":{"name":"+(_:_:)","abstract":"Appends file or directory url to directory url
"},"Functions.html#/s:10SwiftShell4openAA14ReadableStream_pSS_SS10FoundationE8EncodingV8encodingtKF":{"name":"open(_:encoding:)","abstract":"Opens a file for reading, throws if an error occurs.
"},"Functions.html#/s:10SwiftShell4openAA14ReadableStream_p10Foundation3URLV_SSADE8EncodingV8encodingtKF":{"name":"open(_:encoding:)","abstract":"Opens a file for reading, throws if an error occurs.
"},"Functions.html#/s:10SwiftShell4openAA14WritableStream_p10Foundation3URLV10forWriting_Sb9overwriteSSADE8EncodingV8encodingtKF":{"name":"open(forWriting:overwrite:encoding:)","abstract":"Opens a file for writing, creates it first if it doesn’t exist."},"Functions.html#/s:10SwiftShell4openAA14WritableStream_pSS10forWriting_Sb9overwriteSS10FoundationE8EncodingV8encodingtKF":{"name":"open(forWriting:overwrite:encoding:)","abstract":"
Opens a file for writing, creates it first if it doesn’t exist."},"Functions.html#/s:10SwiftShell7streamsAA14WritableStream_p_AA08ReadableE0_ptyF":{"name":"streams()","abstract":"
Creates a pair of streams. What is written to the 1st one can be read from the 2nd one.
"},"Extensions/LazyCollectionProtocol.html#/s:s22LazyCollectionProtocolP10SwiftShells9Equatable7ElementRpzrlE5splitAC0A13SplitSequenceVy8ElementsQzGAF9separator_Sb16allowEmptySlicestF":{"name":"split(separator:allowEmptySlices:)","abstract":"Creates a lazy sequence by splitting this Collection repeatedly.
","parent_name":"LazyCollectionProtocol"},"Extensions/String.html#/s:SS10SwiftShellE7contextAA7Context_pvp":{"name":"context","abstract":"Undocumented
","parent_name":"String"},"Extensions/String.html#/s:SS10SwiftShellE5linesSaySSGyF":{"name":"lines()","abstract":"Splits text into lines (as separated by newlines).
","parent_name":"String"},"Extensions/FileHandle.html#/nullDev":{"name":"nullDev","abstract":"Returns ’/dev/null’. ‘nullDevice’ has not been implemented yet in Swift Foundation.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE7nullDevABvpZ":{"name":"nullDev","abstract":"Returns ’.nullDevice’. ‘nullDevice’ has not been implemented yet in Swift Foundation.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE8readSomeSSSgSS10FoundationE8EncodingV8encoding_tF":{"name":"readSome(encoding:)","abstract":"Reads what is available, as a String.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE4readS2S10FoundationE8EncodingV8encoding_tF":{"name":"read(encoding:)","abstract":"Reads to the end, as a String.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE5writeySS_SS10FoundationE8EncodingV8encodingtF":{"name":"write(_:encoding:)","abstract":"Undocumented
","parent_name":"FileHandle"},"Extensions/Process.html#/terminate()":{"name":"terminate()","abstract":"Terminates the command by sending the SIGTERM signal
","parent_name":"Process"},"Extensions/Process.html#/interrupt()":{"name":"interrupt()","abstract":"Interrupts the command by sending the SIGINT signal
","parent_name":"Process"},"Extensions/Process.html#/suspend()":{"name":"suspend()","abstract":"Temporarily suspends a command. Call resume() to resume a suspended command
","parent_name":"Process"},"Extensions/Process.html#/resume()":{"name":"resume()","abstract":"Resumes a command previously suspended with suspend().
","parent_name":"Process"},"Extensions/Process.html#/s:So7ProcessC10SwiftShellE15launchThrowablyyyKF":{"name":"launchThrowably()","abstract":"Launches process.
","parent_name":"Process"},"Extensions/Process.html#/s:So7ProcessC10SwiftShellE6finishyyKF":{"name":"finish()","abstract":"Waits until process is finished.
","parent_name":"Process"},"Extensions/Process.html":{"name":"Process"},"Extensions/FileHandle.html":{"name":"FileHandle"},"Extensions/String.html":{"name":"String","abstract":"Lets String run commands using itself as stdin.
"},"Extensions/LazyCollectionProtocol.html":{"name":"LazyCollectionProtocol"},"Enums/FileError.html#/s:10SwiftShell9FileErrorO8notFoundACSS4path_tcACmF":{"name":"notFound","abstract":"Undocumented
","parent_name":"FileError"},"Enums/FileError.html#/s:10SwiftShell9FileErrorO05checkC0ySSKFZ":{"name":"checkFile(_:)","abstract":"Undocumented
","parent_name":"FileError"},"Enums/FileError.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"FileError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO08returnedD4CodeACSS7command_Si9errorcodetcACmF":{"name":"returnedErrorCode","abstract":"Exit code was not zero.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO22inAccessibleExecutableACSS4path_tcACmF":{"name":"inAccessibleExecutable","abstract":"Command could not be executed.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO9errorcodeSivp":{"name":"errorcode","abstract":"Exit code for this error.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"CommandError"},"Enums/CommandError.html#/s:s9EquatableP2eeoiSbx_xtFZ":{"name":"==(_:_:)","parent_name":"CommandError"},"Enums/CommandError.html":{"name":"CommandError","abstract":"Error type for commands.
"},"Enums/FileError.html":{"name":"FileError","abstract":"Error type for file commands.
"},"Global Variables.html#/s:10SwiftShell4mainAA11MainContextCvp":{"name":"main","abstract":"Undocumented
"},"Global Variables.html#/s:10SwiftShell5FilesSo11FileManagerCvp":{"name":"Files","abstract":"The default FileManager
"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamC10filehandleSo0cD0Cvp":{"name":"filehandle","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamC8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamCACSo0cD0C_SS10FoundationE8EncodingV8encodingtcfc":{"name":"init(_:encoding:)","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC10filehandleSo10FileHandleCvp":{"name":"filehandle","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC7defaultACvpZ":{"name":"default","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell14WritableStreamP5writeySSF":{"name":"write(_:)","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell14WritableStreamP5closeyyF":{"name":"close()","parent_name":"StdoutStream"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"The default character encoding used throughout SwiftShell.","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC3envs10DictionaryVyS2SGvp":{"name":"env","abstract":"
Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC5stdinAA14ReadableStream_pvp":{"name":"stdin","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC6stdoutAA14WritableStream_pvp":{"name":"stdout","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC8stderrorAA14WritableStream_pvp":{"name":"stderror","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC16currentdirectorySSvp":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC13tempdirectorySSvp":{"name":"tempdirectory","abstract":"The tempdirectory is unique each time a script is run and is created the first time it is used.","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC9argumentsSaySSGvp":{"name":"arguments","abstract":"
The arguments this executable was launched with. Use main.path to get the path.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC4pathSSvp":{"name":"path","abstract":"The path to the currently running executable. Will be empty in playgrounds.
","parent_name":"MainContext"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC6stdoutAA14ReadableStream_pvp":{"name":"stdout","abstract":"Undocumented
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC8stderrorAA14ReadableStream_pvp":{"name":"stderror","abstract":"Undocumented
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC12onCompletionACXDyACcF":{"name":"onCompletion(_:)","abstract":"Takes a closure to be called when the command has finished.
","parent_name":"AsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC9isRunningSbvp":{"name":"isRunning","abstract":"Is the command still running?
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC4stopyyF":{"name":"stop()","abstract":"Terminates the command by sending the SIGTERM signal.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC9interruptyyF":{"name":"interrupt()","abstract":"Interrupts the command by sending the SIGINT signal.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC7suspendSbyF":{"name":"suspend()","abstract":"Temporarily suspends a command. Call resume() to resume a suspended command.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC6resumeSbyF":{"name":"resume()","abstract":"Resumes a command previously suspended with suspend().
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC6finishACXDyKF":{"name":"finish()","abstract":"Waits for this command to finish.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC8exitcodeSiyF":{"name":"exitcode()","abstract":"Waits for command to finish, then returns with exit code.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC17terminationReasonSo7ProcessC011TerminationG0OyF":{"name":"terminationReason()","abstract":"Waits for the command to finish, then returns why the command terminated.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC12onCompletionACXDyACcF":{"name":"onCompletion(_:)","abstract":"Takes a closure to be called when the command has finished.
","parent_name":"PrintedAsyncCommand"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC5errorAA12CommandErrorOSgvp":{"name":"error","abstract":"The error from running the command, if any.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC6stdoutSSvp":{"name":"stdout","abstract":"Standard output, trimmed of whitespace and newline if it is single-line.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC8stderrorSSvp":{"name":"stderror","abstract":"Standard error, trimmed of whitespace and newline if it is single-line.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC8exitcodeSivp":{"name":"exitcode","abstract":"The exit code of the command. Anything but 0 means there was an error.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC9succeededSbvp":{"name":"succeeded","abstract":"Checks if the exit code is 0.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC2aaoiA2C_ACyXKtFZ":{"name":"&&(_:_:)","abstract":"Runs the first command, then the second one only if the first succeeded.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC2oooiA2C_ACyXKtFZ":{"name":"||(_:_:)","abstract":"Runs the first command, then the second one only if the first failed.
","parent_name":"RunOutput"},"Classes/RunOutput.html":{"name":"RunOutput","abstract":"Output from a run command.
"},"Classes/PrintedAsyncCommand.html":{"name":"PrintedAsyncCommand","abstract":"Output from the runAsyncAndPrint commands.
"},"Classes/AsyncCommand.html":{"name":"AsyncCommand","abstract":"Output from the ‘runAsync’ methods.
"},"Classes/MainContext.html":{"name":"MainContext","abstract":"Undocumented
"},"Classes/StdoutStream.html":{"name":"StdoutStream","abstract":"Singleton WritableStream used only for printing to stdout.
"},"Classes/FileHandleStream.html":{"name":"FileHandleStream","abstract":"Undocumented
"},"Classes.html":{"name":"Classes","abstract":"The following classes are available globally.
"},"Global Variables.html":{"name":"Global Variables","abstract":"The following global variables are available globally.
"},"Enums.html":{"name":"Enumerations","abstract":"The following enumerations are available globally.
"},"Extensions.html":{"name":"Extensions","abstract":"The following extensions are available globally.
"},"Functions.html":{"name":"Functions","abstract":"The following functions are available globally.
"},"Protocols.html":{"name":"Protocols","abstract":"The following protocols are available globally.
"},"Structs.html":{"name":"Structures","abstract":"The following structures are available globally.
"}}
\ No newline at end of file
diff --git a/docsets/SwiftShell.docset/Contents/Resources/docSet.dsidx b/docsets/SwiftShell.docset/Contents/Resources/docSet.dsidx
index b85dd2a..42f260c 100644
Binary files a/docsets/SwiftShell.docset/Contents/Resources/docSet.dsidx and b/docsets/SwiftShell.docset/Contents/Resources/docSet.dsidx differ
diff --git a/docsets/SwiftShell.tgz b/docsets/SwiftShell.tgz
index 9744f5b..761e5de 100644
Binary files a/docsets/SwiftShell.tgz and b/docsets/SwiftShell.tgz differ
diff --git a/index.html b/index.html
index 4e81c79..5850f5d 100644
--- a/index.html
+++ b/index.html
@@ -13,7 +13,7 @@
@@ -39,6 +39,9 @@
MainContext
+
+ PrintedAsyncCommand
+
RunOutput
@@ -51,10 +54,10 @@
Global Variables
@@ -84,6 +87,9 @@
Process
+
+ Process
+
String
@@ -95,9 +101,6 @@
+(_:_:)
-
- ==(_:_:)
-
exit(_:file:line:)
@@ -117,23 +120,29 @@
open(forWriting:overwrite:encoding:)
- run(_:_:combineOutput:)
+ run(_:_:combineOutput:)
run(bash:combineOutput:)
- runAndPrint(_:_:)
+ runAndPrint(_:_:)
runAndPrint(bash:)
- runAsync(_:_:file:line:)
+ runAsync(_:_:file:line:)
runAsync(bash:file:line:)
+
+ runAsyncAndPrint(_:_:file:line:)
+
+
+ runAsyncAndPrint(bash:file:line:)
+
streams()
@@ -301,7 +310,7 @@
You can create a copy of your application’s context: let context = CustomContext(main), or create a new empty one: let context = CustomContext(). Everything is mutable, so you can set e.g. the current directory or redirect standard error to a file.
Main context
-The global variable main is the Context for the application itself. In addition to the properties mentioned above it also has these:
+The global variable main is the Context for the application itself. In addition to the properties mentioned above it also has these:
public var encoding: String.Encoding
@@ -348,7 +357,7 @@ The path to the application.
You can use let (input,output) = streams() to create a new pair of streams. What you write to input you can read from output.
-FileSmith’s WritableFile and ReadableFile are streams too, and can be used as stdin, stdout and stderror in SwiftShell Contexts, including main.
+FileSmith’s WritableFile and ReadableFile are streams too, and can be used as stdin, stdout and stderror in SwiftShell Contexts, including main.
WritableStream
When writing to a WritableStream you normally use .print which works exactly like Swift’s built-in print function:
@@ -404,9 +413,9 @@ The path to the application.
Commands
-All Contexts (CustomContext and main) implement CommandRunning, which means they can run commands using themselves as the Context. ReadableStream and String can also run commands, they use main as the Context and themselves as .stdin. As a shortcut you can just use run(...) instead of main.run(...)
+All Contexts (CustomContext and main) implement CommandRunning, which means they can run commands using themselves as the Context. ReadableStream and String can also run commands, they use main as the Context and themselves as .stdin. As a shortcut you can just use run(...) instead of main.run(...)
-There are three different ways of running a command:
+There are 4 different ways of running a command:
Run
The simplest is to just run the command, wait until it’s finished and return the results:
@@ -445,7 +454,7 @@ The path to the application.
try runAndPrint("executable", "arg")
-This runs a command like in the terminal, where any output goes to the Context’s (main in this case) .stdout and .stderror respectively. If the executable could not be found, was inaccessible or not executable, or the command returned with an exit code other than zero, then runAndPrint will throw a CommandError.
+This runs a command like in the terminal, where any output goes to the Context’s (main in this case) .stdout and .stderror respectively. If the executable could not be found, was inaccessible or not executable, or the command returned with an exit code other than zero, then runAndPrint will throw a CommandError.
The name may seem a bit cumbersome, but it explains exactly what it does. SwiftShell never prints anything without explicitly being told to.
Asynchronous
@@ -453,7 +462,7 @@ The path to the application.
// be notified when the command is finished.
}
command.stdout.onOutput { stdout in
- // be notified when the command produces output.
+ // be notified when the command produces output (only on macOS).
}
// do something with ‘command’ while it is still running.
@@ -461,39 +470,47 @@ The path to the application.
try command.finish() // wait for it to finish.
-
runAsync launches a command and continues before it’s finished. It returns this:
-
/// Output from the 'runAsync' methods.
-public final class AsyncCommand {
- public let stdout: ReadableStream
+runAsync launches a command and continues before it’s finished. It returns AsyncCommand which contains this:
+ public let stdout: ReadableStream
public let stderror: ReadableStream
/// Is the command still running?
- public var isRunning: Bool
+ public var isRunning: Bool { get }
- /// Terminates command.
+ /// Terminates the command by sending the SIGTERM signal.
public func stop()
- /// Waits for command to finish.
- /// - returns: itself
- /// - throws: `CommandError.returnedErrorCode(command: String, errorcode: Int)` if the exit code is anything but 0.
- public func finish() throws -> AsyncCommand
+ /// Interrupts the command by sending the SIGINT signal.
+ public func interrupt()
+
+ /// Temporarily suspends a command. Call resume() to resume a suspended command.
+ public func suspend() -> Bool
+
+ /// Resumes a command previously suspended with suspend().
+ public func resume() -> Bool
+
+ /// Waits for this command to finish.
+ public func finish() throws -> Self
/// Waits for command to finish, then returns with exit code.
public func exitcode() -> Int
+ /// Waits for the command to finish, then returns why the command terminated.
+ /// - returns: `.exited` if the command exited normally, otherwise `.uncaughtSignal`.
+ public func terminationReason() -> Process.TerminationReason
+
/// Takes a closure to be called when the command has finished.
- /// - Parameter handler: A closure taking this AsyncCommand as input, returning nothing.
- /// - Returns: This AsyncCommand.
- public func onCompletion(_ handler: @escaping (AsyncCommand) -> Void) -> AsyncCommand
-}
+ public func onCompletion(_ handler: @escaping (AsyncCommand) -> Void) -> Self
You can process standard output and standard error, and optionally wait until it’s finished and handle any errors.
If you read all of command.stderror or command.stdout it will automatically wait for the command to close its streams (and presumably finish running). You can still call finish() to check for errors.
+
+runAsyncAndPrint does the same as runAsync, but prints any output directly and it’s return type PrintedAsyncCommand doesn’t have the .stdout and .stderror properties.
Parameters
-The 3 run functions above take 2 different types of parameters:
+The run* functions above take 2 different types of parameters:
(_ executable: String, _ args: Any …)
If the path to the executable is without any /, SwiftShell will try to find the full path using the which shell command, which searches the directories in the PATH environment variable in order.
@@ -520,16 +537,16 @@ The path to the application.
If the command provided to runAsync could not be launched for any reason the program will print the error to standard error and exit, as is usual in scripts. The runAsync("cmd").finish() method throws an error if the exit code of the command is anything but 0:
let command = runAsync("cmd", "-n", 245)
-// do something with command.stderror or command.stdoutCommandError
+// ...
do {
try command.finish()
-} catch CommandError.ReturnedErrorCode(let error) {
+} catch CommandError.returnedErrorCode(let error) {
// use error.command or error.errorcode
}
The runAndPrint command can also throw this error, in addition to this one if the command could not be launched:
-} catch CommandError.InAccessibleExecutable(let path) {
+} catch CommandError.inAccessibleExecutable(let path) {
// ‘path’ is the full path to the executable
}
@@ -603,7 +620,7 @@ The path to the application.
diff --git a/search.json b/search.json
index d3a669a..18b4969 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-{"Structs/PartialSourceLazySplitSequence.html#/s:10SwiftShell30PartialSourceLazySplitSequenceVACyxGxSgyc_7ElementQz9separatortcfc":{"name":"init(_:separator:)","abstract":"Creates a lazy sequence by splitting a series of collections repeatedly, as if they were one collection.
","parent_name":"PartialSourceLazySplitSequence"},"Structs/PartialSourceLazySplitSequence.html#/s:10SwiftShell30PartialSourceLazySplitSequenceV4next03SubG0QzSgyF":{"name":"next()","abstract":"The contents of ‘bases’ up to the next occurrence of ‘separator’.
","parent_name":"PartialSourceLazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV9remaining03SubE0QzSgv":{"name":"remaining","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV9separator7ElementQzv":{"name":"separator","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV16allowEmptySlicesSbv":{"name":"allowEmptySlices","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceVACyxGx_7ElementQz9separatorSb16allowEmptySlicestcfc":{"name":"init(_:separator:allowEmptySlices:)","abstract":"Creates a lazy sequence by splitting a Collection repeatedly.
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV4next03SubE0QzSgyF":{"name":"next()","abstract":"The contents of ‘base’ up to the next occurrence of ‘separator’.
","parent_name":"LazySplitSequence"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV3envs10DictionaryVyS2SGv":{"name":"env","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV5stdinAA14ReadableStream_pv":{"name":"stdin","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV6stdoutAA14WritableStream_pv":{"name":"stdout","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV8stderrorAA14WritableStream_pv":{"name":"stderror","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV16currentdirectorySSv":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextVACycfc":{"name":"init()","abstract":"Creates a blank CustomContext where env and stdin are empty, stdout and stderror discard everything and","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextVAcA0D0_pcfc":{"name":"init(_:)","abstract":"
Creates an identical copy of another Context.
","parent_name":"CustomContext"},"Structs/CustomContext.html":{"name":"CustomContext","abstract":"Undocumented
"},"Structs/LazySplitSequence.html":{"name":"LazySplitSequence","abstract":"A sequence from splitting a Collection lazily.
"},"Structs/PartialSourceLazySplitSequence.html":{"name":"PartialSourceLazySplitSequence","abstract":"A sequence from splitting a series of Collections lazily, as if they were one Collection.
"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"Undocumented
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP10filehandleSo10FileHandleCv":{"name":"filehandle","abstract":"Undocumented
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP5writeySSF":{"name":"write(_:)","abstract":"Writes x to the stream.
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP5closeyyF":{"name":"close()","abstract":"Closes the stream. Must be called on non-file streams when finished writing,","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamPAAE5printySayypGd_SS9separatorSS10terminatortF":{"name":"print(_:separator:terminator:)","abstract":"
Writes the textual representations of the given items into the stream.","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamPAAE5writey10Foundation4DataV4data_tF":{"name":"write(data:)","abstract":"
Writes data to the stream.
","parent_name":"WritableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP10filehandleSo10FileHandleCv":{"name":"filehandle","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP8readSomeSSSgyF":{"name":"readSome()","abstract":"All the text the stream contains so far.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP4readSSyF":{"name":"read()","abstract":"
Reads everything at once.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5liness12LazySequenceVys03AnyG0VySSGGyF":{"name":"lines()","abstract":"Splits stream lazily into lines.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5writeyqd__z2to_ts010TextOutputD0Rd__lF":{"name":"write(to:)","abstract":"Writes the text in this stream to the given TextOutputStream.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5writeyAA08WritableD0_pz2to_tF":{"name":"write(to:)","abstract":"Writes the text in this stream to the given WritableStream.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE7contextAA7Context_pv":{"name":"context","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE12readSomeData10Foundation0G0VSgyF":{"name":"readSomeData()","abstract":"All the data the stream contains so far.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE8readData10Foundation0F0VyF":{"name":"readData()","abstract":"
Reads everything at once.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE8onOutputyyAaB_pcF":{"name":"onOutput(_:)","abstract":"handler will be called whenever there is new output available.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE14onStringOutputyySScF":{"name":"onStringOutput(_:)","abstract":"handler will be called whenever there is new text output available.
","parent_name":"ReadableStream"},"Protocols/Context.html#/s:10SwiftShell7ContextP3envs10DictionaryVyS2SGv":{"name":"env","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP5stdinAA14ReadableStream_pv":{"name":"stdin","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP6stdoutAA14WritableStream_pv":{"name":"stdout","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP8stderrorAA14WritableStream_pv":{"name":"stderror","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP16currentdirectorySSv":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextPAAE16debugDescriptionSSv":{"name":"debugDescription","abstract":"A textual representation of this instance, suitable for debugging.
","parent_name":"Context"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningP7contextAA7Context_pv":{"name":"context","abstract":"Undocumented
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE3runAA9RunOutputCSS4bash_Sb07combineG0tF":{"name":"run(bash:combineOutput:)","abstract":"Runs a bash shell command.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE8runAsyncAA0fC0CSS4bash_SS4fileSi4linetF":{"name":"runAsync(bash:file:line:)","abstract":"Run bash command and return before it is finished.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE11runAndPrintySS4bash_tKF":{"name":"runAndPrint(bash:)","abstract":"Run bash command and print output and errors.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE3runAA9RunOutputCSS_SayypGdSb07combineG0tF":{"name":"run(_:_:combineOutput:)","abstract":"Runs a command.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE8runAsyncAA0fC0CSS_SayypGdSS4fileSi4linetF":{"name":"runAsync(_:_:file:line:)","abstract":"Run executable and return before it is finished.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE11runAndPrintySS_SayypGdtKF":{"name":"runAndPrint(_:_:)","abstract":"Run executable and print output and errors.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html":{"name":"CommandRunning","abstract":"Can run commands.
"},"Protocols/Context.html":{"name":"Context","abstract":"Undocumented
"},"Protocols.html#/CommandRunning":{"name":"CommandRunning","abstract":"CommandRunning is not available on iOS, tvOS and watchOS.
"},"Protocols/ReadableStream.html":{"name":"ReadableStream","abstract":"A stream of text. Does as much as possible lazily.
"},"Protocols/WritableStream.html":{"name":"WritableStream","abstract":"An output stream, like standard output or a writeable file.
"},"Functions.html#/s:10SwiftShell3runAA9RunOutputCSS4bash_Sb07combineE0tF":{"name":"run(bash:combineOutput:)","abstract":"Runs a bash shell command.
"},"Functions.html#/s:10SwiftShell8runAsyncAA0D7CommandCSS4bash_SS4fileSi4linetF":{"name":"runAsync(bash:file:line:)","abstract":"Run bash command and return before it is finished.
"},"Functions.html#/s:10SwiftShell11runAndPrintySS4bash_tKF":{"name":"runAndPrint(bash:)","abstract":"Run bash command and print output and errors.
"},"Functions.html#/s:10SwiftShell4exits5NeverOx12errormessage_Si9errorcodeSS4fileSi4linetlF":{"name":"exit(errormessage:errorcode:file:line:)","abstract":"Print message to standard error and halt execution.
"},"Functions.html#/s:10SwiftShell4exits5NeverOs5Error_p_SS4fileSi4linetF":{"name":"exit(_:file:line:)","abstract":"Print error to standard error and halt execution.
"},"Functions.html#/s:10SwiftShell2eeoiSbAA12CommandErrorO_ADtF":{"name":"==(_:_:)","abstract":"Undocumented
"},"Functions.html#/s:10SwiftShell3runAA9RunOutputCSS_SayypGdSb07combineE0tF":{"name":"run(_:_:combineOutput:)","abstract":"Runs a command.
"},"Functions.html#/s:10SwiftShell8runAsyncAA0D7CommandCSS_SayypGdSS4fileSi4linetF":{"name":"runAsync(_:_:file:line:)","abstract":"Run executable and return before it is finished.
"},"Functions.html#/s:10SwiftShell11runAndPrintySS_SayypGdtKF":{"name":"runAndPrint(_:_:)","abstract":"Run executable and print output and errors.
"},"Functions.html#/s:10SwiftShell1poi10Foundation3URLVAE_SStF":{"name":"+(_:_:)","abstract":"Append file or directory url to directory url
"},"Functions.html#/s:10SwiftShell4openAA14ReadableStream_pSS_SS10FoundationE8EncodingV8encodingtKF":{"name":"open(_:encoding:)","abstract":"Open a file for reading, throw if an error occurs.
"},"Functions.html#/s:10SwiftShell4openAA14ReadableStream_p10Foundation3URLV_SSADE8EncodingV8encodingtKF":{"name":"open(_:encoding:)","abstract":"Open a file for reading, throw if an error occurs.
"},"Functions.html#/s:10SwiftShell4openAA14WritableStream_p10Foundation3URLV10forWriting_Sb9overwriteSSADE8EncodingV8encodingtKF":{"name":"open(forWriting:overwrite:encoding:)","abstract":"Open a file for writing, create it first if it doesn’t exist."},"Functions.html#/s:10SwiftShell4openAA14WritableStream_pSS10forWriting_Sb9overwriteSS10FoundationE8EncodingV8encodingtKF":{"name":"open(forWriting:overwrite:encoding:)","abstract":"
Open a file for writing, create it first if it doesn’t exist."},"Functions.html#/s:10SwiftShell7streamsAA14WritableStream_p_AA08ReadableE0_ptyF":{"name":"streams()","abstract":"
Creates a pair of streams. What is written to the 1st one can be read from the 2nd one.
"},"Extensions/LazyCollectionProtocol.html#/s:s22LazyCollectionProtocolP10SwiftShellsAARzs9Equatable7ElementRpzs0B08Elements_11SubSequenceRPzlE5splitAC0a5SplitJ0VyAHQzGAF9separator_Sb16allowEmptySlicestF":{"name":"split(separator:allowEmptySlices:)","abstract":"Creates a lazy sequence by splitting this Collection repeatedly.
","parent_name":"LazyCollectionProtocol"},"Extensions/String.html#/s:SS10SwiftShellE7contextAA7Context_pv":{"name":"context","abstract":"Undocumented
","parent_name":"String"},"Extensions/String.html#/s:SS10SwiftShellE5linesSaySSGyF":{"name":"lines()","abstract":"Split text into lines (as separated by newlines).
","parent_name":"String"},"Extensions/FileHandle.html#/nullDev":{"name":"nullDev","abstract":"Returns ’/dev/null’. ‘nullDevice’ has not been implemented yet in Swift Foundation.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE7nullDevABvZ":{"name":"nullDev","abstract":"Returns ’.nullDevice’. ‘nullDevice’ has not been implemented yet in Swift Foundation.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE8readSomeSSSgSS10FoundationE8EncodingV8encoding_tF":{"name":"readSome(encoding:)","abstract":"Read what is available, as a String.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE4readS2S10FoundationE8EncodingV8encoding_tF":{"name":"read(encoding:)","abstract":"Read to the end, as a String.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE5writeySS_SS10FoundationE8EncodingV8encodingtF":{"name":"write(_:encoding:)","abstract":"Undocumented
","parent_name":"FileHandle"},"Extensions/Process.html#/s:So7ProcessC10SwiftShellE15launchThrowablyyyKF":{"name":"launchThrowably()","abstract":"Launch process.
","parent_name":"Process"},"Extensions/Process.html#/s:So7ProcessC10SwiftShellE6finishyyKF":{"name":"finish()","abstract":"Wait until process is finished.
","parent_name":"Process"},"Extensions/Process.html":{"name":"Process"},"Extensions/FileHandle.html":{"name":"FileHandle"},"Extensions/String.html":{"name":"String","abstract":"Let Strings run commands using itself as stdin.
"},"Extensions/LazyCollectionProtocol.html":{"name":"LazyCollectionProtocol"},"Enums/FileError.html#/s:10SwiftShell9FileErrorO8notFoundACSS4path_tcACmF":{"name":"notFound","abstract":"Undocumented
","parent_name":"FileError"},"Enums/FileError.html#/s:10SwiftShell9FileErrorO05checkC0ySSKFZ":{"name":"checkFile(_:)","abstract":"Undocumented
","parent_name":"FileError"},"Enums/FileError.html#/s:s23CustomStringConvertibleP11descriptionSSv":{"name":"description","parent_name":"FileError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO08returnedD4CodeACSS7command_Si9errorcodetcACmF":{"name":"returnedErrorCode","abstract":"Exit code was not zero.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO22inAccessibleExecutableACSS4path_tcACmF":{"name":"inAccessibleExecutable","abstract":"Command could not be executed.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO9errorcodeSiv":{"name":"errorcode","abstract":"Exit code for this error.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:s23CustomStringConvertibleP11descriptionSSv":{"name":"description","parent_name":"CommandError"},"Enums/CommandError.html":{"name":"CommandError","abstract":"Error type for commands.
"},"Enums/FileError.html":{"name":"FileError","abstract":"Error type for file commands.
"},"Global Variables.html#/s:10SwiftShell4mainAA11MainContextCv":{"name":"main","abstract":"Undocumented
"},"Global Variables.html#/s:10SwiftShell5FilesSo11FileManagerCv":{"name":"Files","abstract":"The default FileManager
"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamC10filehandleSo0cD0Cv":{"name":"filehandle","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamC8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamCACSo0cD0C_SS10FoundationE8EncodingV8encodingtcfc":{"name":"init(_:encoding:)","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC10filehandleSo10FileHandleCv":{"name":"filehandle","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC7defaultACvZ":{"name":"default","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell14WritableStreamP5writeySSF":{"name":"write(_:)","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell14WritableStreamP5closeyyF":{"name":"close()","parent_name":"StdoutStream"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC8encodingSS10FoundationE8EncodingVv":{"name":"encoding","abstract":"The default character encoding used throughout SwiftShell.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC3envs10DictionaryVyS2SGv":{"name":"env","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC5stdinAA14ReadableStream_pv":{"name":"stdin","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC6stdoutAA14WritableStream_pv":{"name":"stdout","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC8stderrorAA14WritableStream_pv":{"name":"stderror","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC16currentdirectorySSv":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC13tempdirectorySSv":{"name":"tempdirectory","abstract":"The tempdirectory is unique each time a script is run and is created the first time it is used.","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC9argumentsSaySSGv":{"name":"arguments","abstract":"
The arguments this executable was launched with. Use main.path to get the path.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC4pathSSv":{"name":"path","abstract":"The path to the currently running executable. Will be empty in playgrounds.
","parent_name":"MainContext"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC6stdoutAA14ReadableStream_pv":{"name":"stdout","abstract":"Undocumented
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC8stderrorAA14ReadableStream_pv":{"name":"stderror","abstract":"Undocumented
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC9isRunningSbv":{"name":"isRunning","abstract":"Is the command still running?
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC4stopyyF":{"name":"stop()","abstract":"Terminates command.
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC6finishACyKF":{"name":"finish()","abstract":"Wait for this command to finish.
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC8exitcodeSiyF":{"name":"exitcode()","abstract":"Wait for command to finish, then return with exit code.
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC12onCompletionACyACcF":{"name":"onCompletion(_:)","abstract":"Takes a closure to be called when the command has finished.
","parent_name":"AsyncCommand"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC5errorAA12CommandErrorOSgv":{"name":"error","abstract":"The error from running the command, if any.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC6stdoutSSv":{"name":"stdout","abstract":"Standard output, trimmed of whitespace and newline if it is single-line.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC8stderrorSSv":{"name":"stderror","abstract":"Standard error, trimmed of whitespace and newline if it is single-line.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC8exitcodeSiv":{"name":"exitcode","abstract":"The exit code of the command. Anything but 0 means there was an error.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC9succeededSbv":{"name":"succeeded","abstract":"Checks if the exit code is 0.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC2aaoiA2C_ACyXKtFZ":{"name":"&&(_:_:)","abstract":"Run the first command, then the second one only if the first succeeded.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC2oooiA2C_ACyXKtFZ":{"name":"||(_:_:)","abstract":"Run the first command, then the second one only if the first failed.
","parent_name":"RunOutput"},"Classes/RunOutput.html":{"name":"RunOutput","abstract":"Output from a run command.
"},"Classes/AsyncCommand.html":{"name":"AsyncCommand","abstract":"Output from the ‘runAsync’ methods.
"},"Classes/MainContext.html":{"name":"MainContext","abstract":"Undocumented
"},"Classes/StdoutStream.html":{"name":"StdoutStream","abstract":"Singleton WritableStream used only for printing to stdout.
"},"Classes/FileHandleStream.html":{"name":"FileHandleStream","abstract":"Undocumented
"},"Classes.html":{"name":"Classes","abstract":"The following classes are available globally.
"},"Global Variables.html":{"name":"Global Variables","abstract":"The following global variables are available globally.
"},"Enums.html":{"name":"Enumerations","abstract":"The following enumerations are available globally.
"},"Extensions.html":{"name":"Extensions","abstract":"The following extensions are available globally.
"},"Functions.html":{"name":"Functions","abstract":"The following functions are available globally.
"},"Protocols.html":{"name":"Protocols","abstract":"The following protocols are available globally.
"},"Structs.html":{"name":"Structures","abstract":"The following structures are available globally.
"}}
\ No newline at end of file
+{"Structs/PartialSourceLazySplitSequence.html#/s:10SwiftShell30PartialSourceLazySplitSequenceVACyxGxSgyc_7ElementQz9separatortcfc":{"name":"init(_:separator:)","abstract":"Creates a lazy sequence by splitting a series of collections repeatedly, as if they were one collection.
","parent_name":"PartialSourceLazySplitSequence"},"Structs/PartialSourceLazySplitSequence.html#/s:10SwiftShell30PartialSourceLazySplitSequenceV4next03SubG0QzSgyF":{"name":"next()","abstract":"The contents of ‘bases’ up to the next occurrence of ‘separator’.
","parent_name":"PartialSourceLazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV9remaining03SubE0QzSgvp":{"name":"remaining","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV9separator7ElementQzvp":{"name":"separator","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV16allowEmptySlicesSbvp":{"name":"allowEmptySlices","abstract":"Undocumented
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceVACyxGx_7ElementQz9separatorSb16allowEmptySlicestcfc":{"name":"init(_:separator:allowEmptySlices:)","abstract":"Creates a lazy sequence by splitting a Collection repeatedly.
","parent_name":"LazySplitSequence"},"Structs/LazySplitSequence.html#/s:10SwiftShell17LazySplitSequenceV4next03SubE0QzSgyF":{"name":"next()","abstract":"The contents of ‘base’ up to the next occurrence of ‘separator’.
","parent_name":"LazySplitSequence"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV3envs10DictionaryVyS2SGvp":{"name":"env","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV5stdinAA14ReadableStream_pvp":{"name":"stdin","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV6stdoutAA14WritableStream_pvp":{"name":"stdout","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV8stderrorAA14WritableStream_pvp":{"name":"stderror","abstract":"Undocumented
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextV16currentdirectorySSvp":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextVACycfc":{"name":"init()","abstract":"Creates a blank CustomContext where env and stdin are empty, stdout and stderror discard everything and","parent_name":"CustomContext"},"Structs/CustomContext.html#/s:10SwiftShell13CustomContextVAcA0D0_pcfc":{"name":"init(_:)","abstract":"
Creates an identical copy of another Context.
","parent_name":"CustomContext"},"Structs/CustomContext.html":{"name":"CustomContext","abstract":"Undocumented
"},"Structs/LazySplitSequence.html":{"name":"LazySplitSequence","abstract":"A sequence from splitting a Collection lazily.
"},"Structs/PartialSourceLazySplitSequence.html":{"name":"PartialSourceLazySplitSequence","abstract":"A sequence from splitting a series of Collections lazily, as if they were one Collection.
"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"Undocumented
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP10filehandleSo10FileHandleCvp":{"name":"filehandle","abstract":"Undocumented
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP5writeySSF":{"name":"write(_:)","abstract":"Writes x to the stream.
","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamP5closeyyF":{"name":"close()","abstract":"Closes the stream. Must be called on non-file streams when finished writing,","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamPAAE5printyypd_SS9separatorSS10terminatortF":{"name":"print(_:separator:terminator:)","abstract":"
Writes the textual representations of the given items into the stream.","parent_name":"WritableStream"},"Protocols/WritableStream.html#/s:10SwiftShell14WritableStreamPAAE5writey10Foundation4DataV4data_tF":{"name":"write(data:)","abstract":"
Writes data to the stream.
","parent_name":"WritableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP10filehandleSo10FileHandleCvp":{"name":"filehandle","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP8readSomeSSSgyF":{"name":"readSome()","abstract":"All the text the stream contains so far.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamP4readSSyF":{"name":"read()","abstract":"
Reads everything at once.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5liness12LazySequenceVys03AnyG0VySSGGyF":{"name":"lines()","abstract":"Splits stream lazily into lines.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5writeyqd__z2to_ts010TextOutputD0Rd__lF":{"name":"write(to:)","abstract":"Writes the text in this stream to the given TextOutputStream.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE5writeyAA08WritableD0_pz2to_tF":{"name":"write(to:)","abstract":"Writes the text in this stream to the given WritableStream.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE7contextAA7Context_pvp":{"name":"context","abstract":"Undocumented
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE12readSomeData10Foundation0G0VSgyF":{"name":"readSomeData()","abstract":"All the data the stream contains so far.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE8readData10Foundation0F0VyF":{"name":"readData()","abstract":"
Reads everything at once.","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE8onOutputyyAaB_pcF":{"name":"onOutput(_:)","abstract":"
Sets code to be executed whenever there is new output available.
","parent_name":"ReadableStream"},"Protocols/ReadableStream.html#/s:10SwiftShell14ReadableStreamPAAE14onStringOutputyySScF":{"name":"onStringOutput(_:)","abstract":"Sets code to be executed whenever there is new text output available.
","parent_name":"ReadableStream"},"Protocols/Context.html#/s:10SwiftShell7ContextP3envs10DictionaryVyS2SGvp":{"name":"env","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP5stdinAA14ReadableStream_pvp":{"name":"stdin","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP6stdoutAA14WritableStream_pvp":{"name":"stdout","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP8stderrorAA14WritableStream_pvp":{"name":"stderror","abstract":"Undocumented
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextP16currentdirectorySSvp":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"Context"},"Protocols/Context.html#/s:10SwiftShell7ContextPAAE16debugDescriptionSSvp":{"name":"debugDescription","abstract":"A textual representation of this instance, suitable for debugging.
","parent_name":"Context"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningP7contextAA7Context_pvp":{"name":"context","abstract":"Undocumented
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE3runAA9RunOutputCSS4bash_Sb07combineG0tF":{"name":"run(bash:combineOutput:)","abstract":"Runs a bash shell command.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE8runAsyncAA0fC0CSS4bash_SS4fileSi4linetF":{"name":"runAsync(bash:file:line:)","abstract":"Runs bash command and returns before it is finished.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE16runAsyncAndPrintAA07PrintedfC0CSS4bash_SS4fileSi4linetF":{"name":"runAsyncAndPrint(bash:file:line:)","abstract":"Runs bash command and returns before it is finished.","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE11runAndPrintySS4bash_tKF":{"name":"runAndPrint(bash:)","abstract":"
Runs bash command and prints output and errors.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE3runAA9RunOutputCSS_ypdSb07combineG0tF":{"name":"run(_:_:combineOutput:)","abstract":"Runs a command.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE8runAsyncAA0fC0CSS_ypdSS4fileSi4linetF":{"name":"runAsync(_:_:file:line:)","abstract":"Runs executable and returns before it is finished.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE16runAsyncAndPrintAA07PrintedfC0CSS_ypdSS4fileSi4linetF":{"name":"runAsyncAndPrint(_:_:file:line:)","abstract":"Runs executable and returns before it is finished.","parent_name":"CommandRunning"},"Protocols/CommandRunning.html#/s:10SwiftShell14CommandRunningPAAE11runAndPrintySS_ypdtKF":{"name":"runAndPrint(_:_:)","abstract":"
Runs executable and prints output and errors.
","parent_name":"CommandRunning"},"Protocols/CommandRunning.html":{"name":"CommandRunning","abstract":"Can run commands.
"},"Protocols/Context.html":{"name":"Context","abstract":"Undocumented
"},"Protocols.html#/CommandRunning":{"name":"CommandRunning","abstract":"CommandRunning is not available on iOS, tvOS and watchOS.
"},"Protocols/ReadableStream.html":{"name":"ReadableStream","abstract":"A stream of text. Does as much as possible lazily.
"},"Protocols/WritableStream.html":{"name":"WritableStream","abstract":"An output stream, like standard output or a writeable file.
"},"Functions.html#/s:10SwiftShell3runAA9RunOutputCSS4bash_Sb07combineE0tF":{"name":"run(bash:combineOutput:)","abstract":"Runs a bash shell command.
"},"Functions.html#/s:10SwiftShell8runAsyncAA0D7CommandCSS4bash_SS4fileSi4linetF":{"name":"runAsync(bash:file:line:)","abstract":"Runs bash command and returns before it is finished.
"},"Functions.html#/s:10SwiftShell16runAsyncAndPrintAA07PrintedD7CommandCSS4bash_SS4fileSi4linetF":{"name":"runAsyncAndPrint(bash:file:line:)","abstract":"Runs bash command and returns before it is finished."},"Functions.html#/s:10SwiftShell11runAndPrintySS4bash_tKF":{"name":"runAndPrint(bash:)","abstract":"
Runs bash command and prints output and errors.
"},"Functions.html#/s:10SwiftShell4exits5NeverOx12errormessage_Si9errorcodeSS4fileSi4linetlF":{"name":"exit(errormessage:errorcode:file:line:)","abstract":"Prints message to standard error and terminates the application.
"},"Functions.html#/s:10SwiftShell4exits5NeverOs5Error_p_SS4fileSi4linetF":{"name":"exit(_:file:line:)","abstract":"Prints error to standard error and terminates the application.
"},"Functions.html#/s:10SwiftShell3runAA9RunOutputCSS_ypdSb07combineE0tF":{"name":"run(_:_:combineOutput:)","abstract":"Runs a command.
"},"Functions.html#/s:10SwiftShell8runAsyncAA0D7CommandCSS_ypdSS4fileSi4linetF":{"name":"runAsync(_:_:file:line:)","abstract":"Runs executable and returns before it is finished.
"},"Functions.html#/s:10SwiftShell16runAsyncAndPrintAA07PrintedD7CommandCSS_ypdSS4fileSi4linetF":{"name":"runAsyncAndPrint(_:_:file:line:)","abstract":"Runs executable and returns before it is finished."},"Functions.html#/s:10SwiftShell11runAndPrintySS_ypdtKF":{"name":"runAndPrint(_:_:)","abstract":"
Runs executable and prints output and errors.
"},"Functions.html#/s:10SwiftShell1poi10Foundation3URLVAE_SStF":{"name":"+(_:_:)","abstract":"Appends file or directory url to directory url
"},"Functions.html#/s:10SwiftShell4openAA14ReadableStream_pSS_SS10FoundationE8EncodingV8encodingtKF":{"name":"open(_:encoding:)","abstract":"Opens a file for reading, throws if an error occurs.
"},"Functions.html#/s:10SwiftShell4openAA14ReadableStream_p10Foundation3URLV_SSADE8EncodingV8encodingtKF":{"name":"open(_:encoding:)","abstract":"Opens a file for reading, throws if an error occurs.
"},"Functions.html#/s:10SwiftShell4openAA14WritableStream_p10Foundation3URLV10forWriting_Sb9overwriteSSADE8EncodingV8encodingtKF":{"name":"open(forWriting:overwrite:encoding:)","abstract":"Opens a file for writing, creates it first if it doesn’t exist."},"Functions.html#/s:10SwiftShell4openAA14WritableStream_pSS10forWriting_Sb9overwriteSS10FoundationE8EncodingV8encodingtKF":{"name":"open(forWriting:overwrite:encoding:)","abstract":"
Opens a file for writing, creates it first if it doesn’t exist."},"Functions.html#/s:10SwiftShell7streamsAA14WritableStream_p_AA08ReadableE0_ptyF":{"name":"streams()","abstract":"
Creates a pair of streams. What is written to the 1st one can be read from the 2nd one.
"},"Extensions/LazyCollectionProtocol.html#/s:s22LazyCollectionProtocolP10SwiftShells9Equatable7ElementRpzrlE5splitAC0A13SplitSequenceVy8ElementsQzGAF9separator_Sb16allowEmptySlicestF":{"name":"split(separator:allowEmptySlices:)","abstract":"Creates a lazy sequence by splitting this Collection repeatedly.
","parent_name":"LazyCollectionProtocol"},"Extensions/String.html#/s:SS10SwiftShellE7contextAA7Context_pvp":{"name":"context","abstract":"Undocumented
","parent_name":"String"},"Extensions/String.html#/s:SS10SwiftShellE5linesSaySSGyF":{"name":"lines()","abstract":"Splits text into lines (as separated by newlines).
","parent_name":"String"},"Extensions/FileHandle.html#/nullDev":{"name":"nullDev","abstract":"Returns ’/dev/null’. ‘nullDevice’ has not been implemented yet in Swift Foundation.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE7nullDevABvpZ":{"name":"nullDev","abstract":"Returns ’.nullDevice’. ‘nullDevice’ has not been implemented yet in Swift Foundation.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE8readSomeSSSgSS10FoundationE8EncodingV8encoding_tF":{"name":"readSome(encoding:)","abstract":"Reads what is available, as a String.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE4readS2S10FoundationE8EncodingV8encoding_tF":{"name":"read(encoding:)","abstract":"Reads to the end, as a String.
","parent_name":"FileHandle"},"Extensions/FileHandle.html#/s:So10FileHandleC10SwiftShellE5writeySS_SS10FoundationE8EncodingV8encodingtF":{"name":"write(_:encoding:)","abstract":"Undocumented
","parent_name":"FileHandle"},"Extensions/Process.html#/terminate()":{"name":"terminate()","abstract":"Terminates the command by sending the SIGTERM signal
","parent_name":"Process"},"Extensions/Process.html#/interrupt()":{"name":"interrupt()","abstract":"Interrupts the command by sending the SIGINT signal
","parent_name":"Process"},"Extensions/Process.html#/suspend()":{"name":"suspend()","abstract":"Temporarily suspends a command. Call resume() to resume a suspended command
","parent_name":"Process"},"Extensions/Process.html#/resume()":{"name":"resume()","abstract":"Resumes a command previously suspended with suspend().
","parent_name":"Process"},"Extensions/Process.html#/s:So7ProcessC10SwiftShellE15launchThrowablyyyKF":{"name":"launchThrowably()","abstract":"Launches process.
","parent_name":"Process"},"Extensions/Process.html#/s:So7ProcessC10SwiftShellE6finishyyKF":{"name":"finish()","abstract":"Waits until process is finished.
","parent_name":"Process"},"Extensions/Process.html":{"name":"Process"},"Extensions/FileHandle.html":{"name":"FileHandle"},"Extensions/String.html":{"name":"String","abstract":"Lets String run commands using itself as stdin.
"},"Extensions/LazyCollectionProtocol.html":{"name":"LazyCollectionProtocol"},"Enums/FileError.html#/s:10SwiftShell9FileErrorO8notFoundACSS4path_tcACmF":{"name":"notFound","abstract":"Undocumented
","parent_name":"FileError"},"Enums/FileError.html#/s:10SwiftShell9FileErrorO05checkC0ySSKFZ":{"name":"checkFile(_:)","abstract":"Undocumented
","parent_name":"FileError"},"Enums/FileError.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"FileError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO08returnedD4CodeACSS7command_Si9errorcodetcACmF":{"name":"returnedErrorCode","abstract":"Exit code was not zero.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO22inAccessibleExecutableACSS4path_tcACmF":{"name":"inAccessibleExecutable","abstract":"Command could not be executed.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:10SwiftShell12CommandErrorO9errorcodeSivp":{"name":"errorcode","abstract":"Exit code for this error.
","parent_name":"CommandError"},"Enums/CommandError.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"CommandError"},"Enums/CommandError.html#/s:s9EquatableP2eeoiSbx_xtFZ":{"name":"==(_:_:)","parent_name":"CommandError"},"Enums/CommandError.html":{"name":"CommandError","abstract":"Error type for commands.
"},"Enums/FileError.html":{"name":"FileError","abstract":"Error type for file commands.
"},"Global Variables.html#/s:10SwiftShell4mainAA11MainContextCvp":{"name":"main","abstract":"Undocumented
"},"Global Variables.html#/s:10SwiftShell5FilesSo11FileManagerCvp":{"name":"Files","abstract":"The default FileManager
"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamC10filehandleSo0cD0Cvp":{"name":"filehandle","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamC8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/FileHandleStream.html#/s:10SwiftShell16FileHandleStreamCACSo0cD0C_SS10FoundationE8EncodingV8encodingtcfc":{"name":"init(_:encoding:)","abstract":"Undocumented
","parent_name":"FileHandleStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC10filehandleSo10FileHandleCvp":{"name":"filehandle","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell12StdoutStreamC7defaultACvpZ":{"name":"default","abstract":"Undocumented
","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell14WritableStreamP5writeySSF":{"name":"write(_:)","parent_name":"StdoutStream"},"Classes/StdoutStream.html#/s:10SwiftShell14WritableStreamP5closeyyF":{"name":"close()","parent_name":"StdoutStream"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC8encodingSS10FoundationE8EncodingVvp":{"name":"encoding","abstract":"The default character encoding used throughout SwiftShell.","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC3envs10DictionaryVyS2SGvp":{"name":"env","abstract":"
Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC5stdinAA14ReadableStream_pvp":{"name":"stdin","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC6stdoutAA14WritableStream_pvp":{"name":"stdout","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC8stderrorAA14WritableStream_pvp":{"name":"stderror","abstract":"Undocumented
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC16currentdirectorySSvp":{"name":"currentdirectory","abstract":"The current working directory.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC13tempdirectorySSvp":{"name":"tempdirectory","abstract":"The tempdirectory is unique each time a script is run and is created the first time it is used.","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC9argumentsSaySSGvp":{"name":"arguments","abstract":"
The arguments this executable was launched with. Use main.path to get the path.
","parent_name":"MainContext"},"Classes/MainContext.html#/s:10SwiftShell11MainContextC4pathSSvp":{"name":"path","abstract":"The path to the currently running executable. Will be empty in playgrounds.
","parent_name":"MainContext"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC6stdoutAA14ReadableStream_pvp":{"name":"stdout","abstract":"Undocumented
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC8stderrorAA14ReadableStream_pvp":{"name":"stderror","abstract":"Undocumented
","parent_name":"AsyncCommand"},"Classes/AsyncCommand.html#/s:10SwiftShell12AsyncCommandC12onCompletionACXDyACcF":{"name":"onCompletion(_:)","abstract":"Takes a closure to be called when the command has finished.
","parent_name":"AsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC9isRunningSbvp":{"name":"isRunning","abstract":"Is the command still running?
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC4stopyyF":{"name":"stop()","abstract":"Terminates the command by sending the SIGTERM signal.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC9interruptyyF":{"name":"interrupt()","abstract":"Interrupts the command by sending the SIGINT signal.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC7suspendSbyF":{"name":"suspend()","abstract":"Temporarily suspends a command. Call resume() to resume a suspended command.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC6resumeSbyF":{"name":"resume()","abstract":"Resumes a command previously suspended with suspend().
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC6finishACXDyKF":{"name":"finish()","abstract":"Waits for this command to finish.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC8exitcodeSiyF":{"name":"exitcode()","abstract":"Waits for command to finish, then returns with exit code.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC17terminationReasonSo7ProcessC011TerminationG0OyF":{"name":"terminationReason()","abstract":"Waits for the command to finish, then returns why the command terminated.
","parent_name":"PrintedAsyncCommand"},"Classes/PrintedAsyncCommand.html#/s:10SwiftShell19PrintedAsyncCommandC12onCompletionACXDyACcF":{"name":"onCompletion(_:)","abstract":"Takes a closure to be called when the command has finished.
","parent_name":"PrintedAsyncCommand"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC5errorAA12CommandErrorOSgvp":{"name":"error","abstract":"The error from running the command, if any.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC6stdoutSSvp":{"name":"stdout","abstract":"Standard output, trimmed of whitespace and newline if it is single-line.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC8stderrorSSvp":{"name":"stderror","abstract":"Standard error, trimmed of whitespace and newline if it is single-line.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC8exitcodeSivp":{"name":"exitcode","abstract":"The exit code of the command. Anything but 0 means there was an error.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC9succeededSbvp":{"name":"succeeded","abstract":"Checks if the exit code is 0.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC2aaoiA2C_ACyXKtFZ":{"name":"&&(_:_:)","abstract":"Runs the first command, then the second one only if the first succeeded.
","parent_name":"RunOutput"},"Classes/RunOutput.html#/s:10SwiftShell9RunOutputC2oooiA2C_ACyXKtFZ":{"name":"||(_:_:)","abstract":"Runs the first command, then the second one only if the first failed.
","parent_name":"RunOutput"},"Classes/RunOutput.html":{"name":"RunOutput","abstract":"Output from a run command.
"},"Classes/PrintedAsyncCommand.html":{"name":"PrintedAsyncCommand","abstract":"Output from the runAsyncAndPrint commands.
"},"Classes/AsyncCommand.html":{"name":"AsyncCommand","abstract":"Output from the ‘runAsync’ methods.
"},"Classes/MainContext.html":{"name":"MainContext","abstract":"Undocumented
"},"Classes/StdoutStream.html":{"name":"StdoutStream","abstract":"Singleton WritableStream used only for printing to stdout.
"},"Classes/FileHandleStream.html":{"name":"FileHandleStream","abstract":"Undocumented
"},"Classes.html":{"name":"Classes","abstract":"The following classes are available globally.
"},"Global Variables.html":{"name":"Global Variables","abstract":"The following global variables are available globally.
"},"Enums.html":{"name":"Enumerations","abstract":"The following enumerations are available globally.
"},"Extensions.html":{"name":"Extensions","abstract":"The following extensions are available globally.
"},"Functions.html":{"name":"Functions","abstract":"The following functions are available globally.
"},"Protocols.html":{"name":"Protocols","abstract":"The following protocols are available globally.
"},"Structs.html":{"name":"Structures","abstract":"The following structures are available globally.
"}}
\ No newline at end of file
diff --git a/undocumented.json b/undocumented.json
index 2830b73..3a87b2c 100644
--- a/undocumented.json
+++ b/undocumented.json
@@ -2,35 +2,28 @@
"warnings": [
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Command.swift",
- "line": 53,
+ "line": 45,
"symbol": "CommandRunning.context",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Command.swift",
- "line": 57,
+ "line": 49,
"symbol": "CommandRunning.context",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Command.swift",
- "line": 124,
- "symbol": "==(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.free",
- "warning": "undocumented"
- },
- {
- "file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Command.swift",
- "line": 279,
+ "line": 333,
"symbol": "AsyncCommand.stdout",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Command.swift",
- "line": 280,
+ "line": 334,
"symbol": "AsyncCommand.stderror",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
@@ -121,70 +114,70 @@
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Context.swift",
- "line": 100,
+ "line": 97,
"symbol": "MainContext.env",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Context.swift",
- "line": 101,
+ "line": 98,
"symbol": "MainContext.stdin",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Context.swift",
- "line": 102,
+ "line": 101,
"symbol": "MainContext.stdout",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Context.swift",
- "line": 103,
+ "line": 106,
"symbol": "MainContext.stderror",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Context.swift",
- "line": 138,
+ "line": 142,
"symbol": "main",
"symbol_kind": "source.lang.swift.decl.var.global",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Files.swift",
- "line": 23,
+ "line": 22,
"symbol": "FileError.notFound",
"symbol_kind": "source.lang.swift.decl.enumelement",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Files.swift",
- "line": 25,
+ "line": 24,
"symbol": "FileError.checkFile(_:)",
"symbol_kind": "source.lang.swift.decl.function.method.static",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Stream/Lazy-split.swift",
- "line": 23,
+ "line": 22,
"symbol": "LazySplitSequence.remaining",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Stream/Lazy-split.swift",
- "line": 24,
+ "line": 23,
"symbol": "LazySplitSequence.separator",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"
},
{
"file": "/Users/karemorstol/Programming/SwiftShell/SwiftShell3/Sources/SwiftShell/Stream/Lazy-split.swift",
- "line": 25,
+ "line": 24,
"symbol": "LazySplitSequence.allowEmptySlices",
"symbol_kind": "source.lang.swift.decl.var.instance",
"warning": "undocumented"