Versions in this module Expand all Collapse all v2 v2.0.0 Apr 13, 2022 Changes in this version + func Exit(code int, msg string, w ...io.Writer) + func ExitWithError(err Error, w ...io.Writer) + func Exitf(code int, tmpl string, args ...any) + func ExitfOn(code int, tmpl string, w io.Writer, args ...any) + func FocusedElement(c Cycler) string + func HistoryFilter(h History, r *regexp.Regexp) (out []string) + func HistoryFilterMotive(h History, motive string, insensitive ...bool) (out []string) + func HistoryFilterPrefix(h History, prefix string, insensitive ...bool) (out []string) + func HistoryFilterSuffix(h History, suffix string, insensitive ...bool) (out []string) + func HistoryList(h History) (out []string) + func IsFocused(c Cycler) bool + func Unfocus(h History) + type Console interface + AppendHistory func(string) + ClearHistory func() + LoadHistory func(io.Reader) (int, error) + SaveHistory func(io.Writer) (int, error) + type ConvFunc func(string) (T, error) + type Cycler interface + Append func(string) + Clear func() + Cursor func() int + Index func(int) string + Len func() int + Next func() bool + Prev func() bool + SetCursor func(int) bool + type Error interface + Code func() int + Error func() string + type History interface + Read func(io.Reader) (int, error) + Write func(io.Writer) (int, error) + type ParsedPromptFunc func(string) (T, error) + func MultiplePrompt(sp PromptFunc, conv ConvFunc[T], t ...scanner.Tokenizer) ParsedPromptFunc[[]T] + func ParsedPrompt(sp PromptFunc, conv ConvFunc[T]) ParsedPromptFunc[T] + func PromptBool(sp PromptFunc) ParsedPromptFunc[bool] + func PromptFloat(sp PromptFunc) ParsedPromptFunc[float64] + func PromptInt(sp PromptFunc) ParsedPromptFunc[int] + func PromptSlice(sp PromptFunc, t ...scanner.Tokenizer) ParsedPromptFunc[[]string] + func PromptSliceBool(sp PromptFunc, t ...scanner.Tokenizer) ParsedPromptFunc[[]bool] + func PromptSliceFloat(sp PromptFunc, t ...scanner.Tokenizer) ParsedPromptFunc[[]float64] + func PromptSliceInt(sp PromptFunc, t ...scanner.Tokenizer) ParsedPromptFunc[[]int] + func PromptSliceUint(sp PromptFunc, t ...scanner.Tokenizer) ParsedPromptFunc[[]uint] + func PromptUint(sp PromptFunc) ParsedPromptFunc[uint] + type PromptFunc func(string) (string, error) + func PromptOf(p Prompter) PromptFunc + type Prompter interface + Prompt func(string) (string, error) Other modules containing this package framagit.org/benjamin.vaudour/shell