Skip to main content

Module commands

Module commands 

Source
Expand description

Cleanroom Rust port of upstream Go source file: commands.go Upstream Target Tag / Version: v2.0.8

# Commands

Built-in command functions (batch, sequence, every, tick, request_window_size).

Structs§

BatchMsg
BatchMsg is a message used to perform a bunch of commands concurrently with no ordering guarantees. You can send a BatchMsg with batch.
InterruptMsg
InterruptMsg signals the program should interrupt. This usually happens when ctrl+c is pressed on common programs, but since bubbletea puts the terminal in raw mode, we need to handle it in a per-program basis.
QuitMsg
QuitMsg signals the program to exit.
RequestWindowSizeMsg
RequestWindowSizeMsg is a message that requests terminal window size.
ResumeMsg
ResumeMsg can be listened to do something once a program is resumed back from a suspend state.
SequenceMsg
SequenceMsg is used internally to run the given commands in order.
SuspendMsg
SuspendMsg signals the program should suspend. This usually happens when ctrl+z is pressed on common programs, but since bubbletea puts the terminal in raw mode, we need to handle it in a per-program basis.

Functions§

batch
Batch performs a bunch of commands concurrently with no ordering guarantees about the results. Use batch to return several commands.
every
Every is a command that ticks in sync with the system clock. So, if you wanted to tick with the system clock every second, minute or hour you could use this. It’s also handy for having different things tick in sync.
interrupt
Interrupt is a special command that tells the Bubble Tea program to interrupt.
quit
Quit is a command that signals the program to exit.
request_window_size
RequestWindowSize is a command that queries the terminal for its current size. It delivers the results to update via a WindowSizeMsg. Keep in mind that WindowSizeMsgs will automatically be delivered to update when the Program starts and when the window dimensions change, so in many cases you will not need to explicitly invoke this command.
sequence
Sequence runs the given commands one at a time, in order. Contrast this with batch, which runs commands concurrently.
suspend
Suspend is a special command that tells the Bubble Tea program to suspend.
tick
Tick produces a command at an interval independent of the system clock at the given duration. That is, the timer begins precisely when invoked, and runs for its entire duration.