From 06ad0204f9e6c74f7e3ae06d89323d9bd022d5eb Mon Sep 17 00:00:00 2001 From: Tommaso Negri Date: Fri, 7 Aug 2026 23:51:15 +0200 Subject: improve documentation --- Sources/phbar/Models/Runner.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Sources/phbar/Models/Runner.swift') 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() } -- cgit v1.2.3