Documentation ¶
Overview ¶
Package shell provides sources for the interactive shell
Index ¶
- Constants
- Variables
- func CommandLine(ctx context.Context, block []rune, _ string, _ bool, ...)
- func ConfigReadGetCursorPos() (interface{}, error)
- func ConfigWriteGetCursorPos(v interface{}) error
- func DynamicPreview(previewBlock string, exe string, params []string) readline.PreviewFuncT
- func HintCodeBlock() []rune
- func PreviewCommand(ctx context.Context, _ []rune, command string, _ bool, ...)
- func PreviewFile(ctx context.Context, _ []rune, filename string, incImages bool, ...)
- func PreviewParameter(ctx context.Context, block []rune, parameter string, incImages bool, ...)
- func SignalHandler(interactive bool)
- func Spellchecker(r []rune) []rune
- func Start()
Constants ¶
View Source
const ( // PromptSIGINT defines the string to write when ctrl+c is pressed PromptSIGINT = "^C" // PromptSIGQUIT defines the string to write when ctrl+\ is pressed PromptSIGQUIT = "^\\" // PromptEOF defines the string to write when ctrl+d is pressed PromptEOF = "^D" )
Variables ¶
View Source
var ( // Prompt is the readline instance Prompt = readline.NewInstance() // Events is a callback for onPrompt events Events func(string, []rune) )
Functions ¶
func CommandLine ¶
func CommandLine(ctx context.Context, block []rune, _ string, _ bool, size *readline.PreviewSizeT, callback readline.PreviewFuncCallbackT)
func ConfigReadGetCursorPos ¶
func ConfigReadGetCursorPos() (interface{}, error)
ConfigReadGetCursorPos is a dynamic config wrapper function for Prompt.EnableGetCursorPos
func ConfigWriteGetCursorPos ¶
func ConfigWriteGetCursorPos(v interface{}) error
ConfigWriteGetCursorPos is a dynamic config wrapper function for Prompt.EnableGetCursorPos
func DynamicPreview ¶
func DynamicPreview(previewBlock string, exe string, params []string) readline.PreviewFuncT
func HintCodeBlock ¶
func HintCodeBlock() []rune
func PreviewCommand ¶
func PreviewCommand(ctx context.Context, _ []rune, command string, _ bool, size *readline.PreviewSizeT, callback readline.PreviewFuncCallbackT)
func PreviewFile ¶
func PreviewFile(ctx context.Context, _ []rune, filename string, incImages bool, size *readline.PreviewSizeT, callback readline.PreviewFuncCallbackT)
func PreviewParameter ¶
func PreviewParameter(ctx context.Context, block []rune, parameter string, incImages bool, size *readline.PreviewSizeT, callback readline.PreviewFuncCallbackT)
func SignalHandler ¶
func SignalHandler(interactive bool)
SignalHandler is an internal function to capture and handle OS signals (eg SIGTERM).
func Spellchecker ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.