Allow custom input and output destinations #20

Open
opened 2025-10-14 15:43:32 -06:00 by navan · 0 comments
Owner

Originally created by @Joannis on 5/1/2024

This PR should address #13 , allowing us to communicate outside of stdin and stdout.

  • startInBackground is added so that this library work with structured concurrency, and doesn't require the start to be top-level. In Structured concurrency, the main thread is already active and usable
  • In addition, a new initializer and set of functions are exposed which allow input to come from an external source (SSH server), and output to be emitted in the same fashion.
  • I should've put this in a separate PR, but \r is sent by the ssh client when pressing a button. I've made sure buttons can parse that input

An example implementation: https://github.com/orlandos-nl/Citadel/pull/65/files#diff-81bcbcd2ec23b21cc7b25d541760ca887a9e2819b67b7bbaa939bed4b83ef3df

*Originally created by @Joannis on 5/1/2024* This PR should address #13 , allowing us to communicate outside of `stdin` and `stdout`. - `startInBackground` is added so that this library work with structured concurrency, and doesn't require the start to be top-level. In Structured concurrency, the main thread is already active and usable - In addition, a new initializer and set of functions are exposed which allow input to come from an external source (SSH server), and output to be emitted in the same fashion. - I should've put this in a separate PR, but `\r` is sent by the `ssh` client when pressing a button. I've made sure buttons can parse that input An example implementation: https://github.com/orlandos-nl/Citadel/pull/65/files#diff-81bcbcd2ec23b21cc7b25d541760ca887a9e2819b67b7bbaa939bed4b83ef3df
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/SwiftTUI#20
No description provided.