diff options
| author | Tommaso Negri <me@tommasongr.com> | 2026-08-07 23:51:15 +0200 |
|---|---|---|
| committer | Tommaso Negri <me@tommasongr.com> | 2026-08-07 23:51:15 +0200 |
| commit | 06ad0204f9e6c74f7e3ae06d89323d9bd022d5eb (patch) | |
| tree | 013590f98900b5daedc6a5bc9ab70906fd1fcea6 /Sources/phbar/Models/Runner.swift | |
| parent | a211c90700cc9d21d3c3e5d92205eeb385a54e4a (diff) | |
| download | bar-06ad0204f9e6c74f7e3ae06d89323d9bd022d5eb.tar.gz bar-06ad0204f9e6c74f7e3ae06d89323d9bd022d5eb.zip | |
improve documentation
Diffstat (limited to 'Sources/phbar/Models/Runner.swift')
| -rw-r--r-- | Sources/phbar/Models/Runner.swift | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Sources/phbar/Models/Runner.swift b/Sources/phbar/Models/Runner.swift index a98d34a..2466e26 100644 --- a/Sources/phbar/Models/Runner.swift +++ b/Sources/phbar/Models/Runner.swift @@ -1,6 +1,6 @@ import Foundation -/// Runs a shell command and returns its stdout as cells (one per line). +/// Runs a shell command and returns its stdout as separate lines. /// /// Blocking — always call from a background context (e.g. `Task.detached`). enum Runner { @@ -34,9 +34,9 @@ enum Runner { return parse(String(data: data, encoding: .utf8) ?? "") } - /// Split output into cells: one per line. A single trailing newline (from a - /// final `\n`) is dropped; blank lines elsewhere are kept so a script can - /// emit intentional gaps. + /// Split output into lines. A single trailing newline + /// (from a final `\n`) is dropped; blank lines elsewhere + /// are kept so a script can emit intentional gaps. static func parse(_ text: String) -> [String] { var lines = text.components(separatedBy: "\n") if lines.last == "" { lines.removeLast() } |
