Make HeadlessTerminal.process public#460
Merged
migueldeicaza merged 1 commit intomigueldeicaza:mainfrom Feb 3, 2026
Merged
Conversation
The following members were internal, making them inaccessible from external modules that import SwiftTerm: 1. process: LocalProcess - Users need this to call startProcess() after initialization to start a child process. 2. send(data: ArraySlice<UInt8>) and send(_ text: String) - Users need these to send commands to the terminal. Previously, the only public send method was send(source: Terminal, data: ArraySlice<UInt8>), which is a protocol method with unnecessary parameters. This change aligns with the existing pattern in the package's own CaptureOutput target, which also accesses these members directly.
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
processproperty inHeadlessTerminalwas internal, making it inaccessible from external modules that import SwiftTerm. This prevented users from callingstartProcess()on theLocalProcessinstance.Since
HeadlessTerminalis designed to provide a headless terminal emulator that can be scripted and screen-scraped, users need access to the underlyingLocalProcessto start a child process after initialization.This change aligns with the existing pattern in the package's own
CaptureOutputtarget, which also accesses theprocessproperty directly (but works because it's in the same package).