Documentation
¶
Index ¶
- Constants
- func ConfirmOrDie(appConfig util.AppConfig, prompt string)
- func GetCommitSelection(stdIo util.StdIo, options CommitSelectionOptions) ([]templates.GitLog, error)
- func GetTableSelection(prompt string, columns []string, rows [][]string, multiselect bool, ...) []int
- func InteractiveEnabled(appConfig util.AppConfig) bool
- func NewMessageKey(keyType tea.KeyType) tea.KeyMsg
- func NewMessageRune(r rune) tea.KeyMsg
- func RequireInput(t *testing.T)
- func SendToProgram(programIndex int, messages ...tea.Msg)
- func UserSelection(asyncConfig util.AsyncAppConfig) string
- type CommitSelectionOptions
- type CommitType
Constants ¶
View Source
const REVIEWERS_HISTORY_FILE = "reviewers.history"
Variables ¶
This section is empty.
Functions ¶
func ConfirmOrDie ¶ added in v2.0.13
func GetCommitSelection ¶
func GetCommitSelection(stdIo util.StdIo, options CommitSelectionOptions) ([]templates.GitLog, error)
Returns an empty array if user cancelled.
func GetTableSelection ¶
func GetTableSelection( prompt string, columns []string, rows [][]string, multiselect bool, stdIo util.StdIo, rowEnabled func(row int) bool, ) []int
Returns empty selection if the user cancelled.
func InteractiveEnabled ¶ added in v2.0.13
func NewMessageKey ¶
Convienience method for creating a message for when user hits a non-rune key like enter or up/down.
func NewMessageRune ¶
Convienience method for creating a message for when user typed a key.
func RequireInput ¶ added in v2.0.13
func SendToProgram ¶
Sends messages to the program. Each time [NewProgram] is called after SendToProgram programIndex is incremented. This is used instead of using stdin to avoid having to (somehow?) fake keyboard scan codes.
func UserSelection ¶ added in v2.0.13
func UserSelection(asyncConfig util.AsyncAppConfig) string
Types ¶
type CommitSelectionOptions ¶ added in v2.0.13
type CommitSelectionOptions struct {
CommitType CommitType
MultiSelect bool
Prompt string
}
type CommitType ¶ added in v2.0.13
type CommitType int
const ( CommitTypePr CommitType = iota CommitTypeNoPr CommitTypeBoth )
Click to show internal directories.
Click to hide internal directories.