Documentation ¶
Overview ¶
Package input provides functionality that makes use of the github.com/charmbracelet/bubbletea package for terminal input.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is a custom github.com/charmbracelet/bubbletea#Model that reads the filename of a new note.
type ReturnValue ¶
ReturnValue is a hack to allow the charmbracelet/bubbletea#Model to return the latest value from the terminal input whilst also preserving the prompt. This is due to charmbracelet/bubbletea#Program.StartReturningModel returning an interface which does not expose this value, thus instead when the .Update() function of model has completed, the .View() function of the model will return a JSON string instead of the raw prompt output. This allows the consuming package to print the prompt a final time, thus preserving it for the user, as well as having access to the raw value.