ControlClient.output
Terminal output tmux pushes, as a cold Flow.
Source and package
- Qualified name
-
io.github .libtmux .kotlin .Control Client. output - Package
- io.github.libtmux.kotlin
- Declared in
ControlClient- Distribution
- io.github.libtmux:libtmux-kotlin
- Source
- libtmux-kotlin/src/main/kotlin/io/github/libtmux/kotlin/ControlClient.kt
- public fun output( capacity: Int, on
Subscribed :Kotlin suspending functionsAllows a function to call suspending operations and pause without blocking a thread. It does not start a coroutine by itself. () -> Unit = {} ): Flow<Delivery<PaneOutput >> -
Description
A fresh Java subscription opens per
kotlinx.coroutines.flow.Flow.collectand closes when collection ends, cancels, or throws — fan-out means collecting twice, each with its own gap accounting. Notsuspend: opening the subscription is local and does no tmux round trip: only collecting it reads.Output tmux sends before the subscription opens is not delivered, and a cold flow opens it only when collection starts. So a command whose output is wanted belongs in
onSubscribed, which runs once the subscription exists and before the first read, rather than beforecollect:control.output(32) { control.send("send-keys", ...) }.- Parameters
-
-
onSubscribed(Kotlin suspending functionsAllows a function to call suspending operations and pause without blocking a thread. It does not start a coroutine by itself.)Default
{}
Recorded calls
source callsThe Kotlin reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls io.github.libtmux.kotlin.ControlClient.output.
Guides
task materialPages that discuss output.