# Functions
AutoCompleteGoLangKeywords is a simple auto-completer that helps auto-complete most of the known GoLang suggestions.
AutoCompletePythonKeywords is a simple auto-completer that helps auto-complete most of the known Python suggestions.
AutoCompleteSimple returns an AutoCompleter which will use the given list of suggestions in an optimized fashion for look-ups.
AutoCompleteSQLKeywords is a simple auto-completer that helps auto-complete most of the known SQL suggestions.
LineCentered uses the given text as the "header" text and centers it.
LineRuler prints a ruler above the prompt.
LineSimple uses the given text as the "header" text.
New returns a Prompter than can be used over and over to run a CLI.
PrefixNone uses no prompt prefix.
PrefixSimple uses "> " as the prompt prefix.
PrefixText uses the given text as the prompt prefix.
PrefixTimestamp uses a timestamp and a prefix as the prompt prefix.
SyntaxHighlighterChroma uses the "github.com/alecthomas/chroma" library to do the syntax highlighting.
SyntaxHighlighterSQL uses Chroma to return a SQL syntax highlighter.
TerminationCheckerNone returns true for all inputs and does not abort the "terminate" action.
TerminationCheckerSQL returns true if the input is supposed to be a SQL statement, and is terminated properly with a semicolon, or is a command starting with "/".
WidthEnforcerDefault -.
# Constants
abort the prompt completely and return to caller.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
force an auto-complete.
choose the next suggestion.
choose the previous suggestion.
select the current suggestion.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
!13 => exec 13th command in history.
!! => list all history.
No description provided by the author
60hz.
Supported Keys.
delete the character at the cursor.
delete the character before the cursor.
delete the next work.
delete the previous word.
Supported Keys.
Supported Keys.
erase the entire prompt.
erase from cursor to the beginning of current line.
erase from cursor to the end of current line.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
show command executed after current command if any.
show previously executed command if any.
Supported Keys.
Supported Keys.
make the word at the cursor capitalized.
make the word at the cursor lower case.
make the word at the cursor upper case.
move the cursor down one line.
move the cursor left one character.
move the cursor right one character.
move to the beginning of the entire prompt text.
move to the beginning of the current line.
move to the end of the entire prompt text.
move to the end of the current line.
move to the beginning of the next word.
move to the beginning of the previous word.
move the cursor up one line.
no action.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
Supported Keys.
trigger the termination checker if any, or return the text.
# Variables
ErrAborted is returned when the execution is terminated for any unexpected reason.
ErrDuplicateKeyAssignment is returned when the key map has the same keys defined for multiple incompatible actions.
ErrInvalidDimensions is returned when the style sheet has dimensions that does not make sense.
ErrUnsupportedChromaLanguage is returned when Syntax-Highlighting is requested with Chroma library with a language that it does not understand.
ErrUnsupportedInput is returned when the input given to a function is not supported or handled.
KeyMapDefault uses KeyMapSingleLine as the default key-map.
KeyMapMultiLine defines sane key sequences for each supported action for a prompt that supports multi-line inputs.
KeyMapSingleLine defines sane key sequences for each supported action for a prompt that supports single-line inputs.
StyleAutoCompleteDefault - default Style when none provided.
StyleColorsDefault - default style when none provided.
StyleCursorDefault - default style when none provided.
StyleDefault - default Style when none provided.
StyleDimensionsDefault - default style when none provided.
StyleLineNumbersEnabled - enabled with sane defaults.
StyleLineNumbersNone - line numbers not enabled.
StyleScrollbarAutoComplete - default style for the auto-complete drop-down.
StyleScrollbarDefault - default style when none provided.
# Structs
AutoCompleteKeyMap is the KeyMap used in AutoComplete mode.
Color contain the foreground and background colors to use to format text.
CursorLocation contains the current cursor position in a 2d-wall-of-text; the values are 0-indexed to keep it simple to manipulate the wall of text.
History contains the past commands executed by the user using Prompt.
HistoryCommand contains the command and associated timestamp.
InsertKeyMap is the KeyMap used in Insert mode.
KeyMap can be used to customize or define the behavior of the Prompt for each special Key sequences that is entered by the User.
Style is used to customize the look and feel of everything about the prompt.
StyleAutoComplete is used to customize the look and feel of the auto-complete dropdown.
StyleColors is used to customize the colors used on the prompt.
StyleCursor is used to customize the look and feel of the cursor.
StyleDimensions is used to customize the sizing of the prompt.
StyleLineNumbers is used to customize the look and feel of the line numbers in the prompt.
StyleScrollbar is used to customize the look and feel of the scrollbar.
Suggestion is what is returned by the auto-completer.
# Interfaces
Prompter in the interface to create and manage a shell-like interactive command prompt.
# Type aliases
Action defines an activity that is done based on a key sequence.
AutoCompleter defines a function that takes the entire user input, the word the user is specifically on, and the location of the cursor on the entire sentence.
KeySequence defines a special key-sequence that the user presses.
KeySequences are a slice of KeySequence(s).
LineGenerator is a function that takes the width of the terminal as input and generates a "line" of content to be display on the terminal above or below the prompt.
Prefixer returns the string to precede any new prompt.
SyntaxHighlighter helps do syntax highlighting by using ANSI color codes on the prompt text.
TerminationChecker returns true if the command is terminated and is ready to be processed.
WidthEnforcer is a function that will enforce a "max-length" condition on the given text.