Documentation
¶
Overview ¶
Package tui is mdsh's interactive mode: a terminal UI that shows a document, runs its blocks as they are picked, and saves their output back to the file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the TUI's state. It is a tea.Model.
type Options ¶
type Options struct {
// Run are the options every run uses. Run.File must be set. The TUI
// sets Confirm and OnEvent itself.
Run run.Options
// Yes runs confirm blocks, and every block in step mode, without
// asking.
Yes bool
// Save writes the document's new contents to Run.File.
Save func([]byte) error
// AutoSave saves after every block that runs. Otherwise output is
// saved when w is pressed.
AutoSave bool
// Images turns on image previews, drawn with colored half blocks.
Images bool
// Protocol is how v shows an image at full size. With termimg.None
// it is drawn with half blocks, as large as the terminal allows.
Protocol termimg.Protocol
// Style is the glamour style prose is drawn in, such as "dark",
// "light" or "notty".
Style string
}
Options configure the TUI.