Documentation
¶
Overview ¶
Package input is the TUI's shared text-entry substrate: thin themed wrappers over bubbles/textinput and textarea, plus the external-editor hop. Every prompt in the dashboard (filter, JQL, action verbs) goes through here, so cursor movement, word-wise editing and bracketed paste behave identically everywhere — replacing the hand-rolled append-only buffers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Edit ¶
Edit suspends the TUI and opens the external editor on a temp file seeded with initial; the result returns as an EditorFinishedMsg. The editor value runs through the shell so commands with flags ("nvim -f") work.
func EditorCommand ¶
func EditorCommand() string
EditorCommand returns the configured external editor: $JIRA_EDITOR wins, $EDITOR is the fallback, "" means none — multiline fields then use the in-TUI textarea instead. One rule, no per-field knobs.
Types ¶
type Area ¶
type Area struct {
// contains filtered or unexported fields
}
Area is a multiline input, the in-TUI fallback when no external editor is configured. The zero value is not usable; construct with NewArea.
type EditorFinishedMsg ¶
EditorFinishedMsg delivers the text written in the external editor. ID is the opener's routing tag (e.g. "comment:JCT-12") so the consumer knows which flow to resume. Err is set when the editor could not run or the buffer could not be read back.
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
Line is a single-line input. The zero value is not usable; construct with NewLine.
func (*Line) SetSuggestions ¶
SetSuggestions enables ghost-text autocompletion over the given values: typing a prefix shows the rest faint, and the textinput's accept binding (tab / ctrl+e / right at end) completes it.
func (*Line) SetValue ¶
SetValue replaces the content and moves the cursor to the end (the natural spot when prefilling, e.g. the current summary for an edit).
func (*Line) SetWidth ¶
SetWidth bounds the rendered width, clamped to at least one column so a too-narrow pane can never push a negative width into the textinput (which panics on View).
func (Line) Suggestions ¶
Suggestions returns the current completion values.