Documentation
¶
Index ¶
- type Terminal
- func (t *Terminal) CleanCurrentLine()
- func (t *Terminal) CleanNextLines(lines int)
- func (t *Terminal) ClearHistory()
- func (t *Terminal) CopyToClipboard(userInput string)
- func (t *Terminal) CountHistory() int
- func (t *Terminal) FnClearScreen()
- func (t *Terminal) FnDeleteLastLine()
- func (t *Terminal) FnExitProgram()
- func (t *Terminal) Get(data ...string) TerminalResponse
- func (t *Terminal) GetAdjustedLine(items []string, separator string) (string, int)
- func (t *Terminal) GetHistory(index int) []string
- func (t *Terminal) GetHistoryAt(index int) (string, error)
- func (t *Terminal) PasteClipboard(userInput *string)
- func (t *Terminal) PrintError(text string, params ...any)
- func (t *Terminal) PrintHistory(limit int)
- func (t *Terminal) PrintInfo(text string, params ...any)
- func (t *Terminal) PrintSuccess(text string, params ...any)
- func (t *Terminal) PrintText(text string, params ...any)
- func (t *Terminal) PrintWarning(text string, params ...any)
- type TerminalResponse
- type TerminalResponseType
- type TerminalStyles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Terminal ¶
type Terminal struct { Styles TerminalStyles Commands []gt.Command BypassCharacter string CtrlKeys []byte // contains filtered or unexported fields }
func (*Terminal) CleanCurrentLine ¶ added in v1.0.13
func (t *Terminal) CleanCurrentLine()
func (*Terminal) CleanNextLines ¶ added in v1.0.13
func (*Terminal) ClearHistory ¶ added in v1.0.9
func (t *Terminal) ClearHistory()
func (*Terminal) CopyToClipboard ¶ added in v1.0.10
func (*Terminal) CountHistory ¶ added in v1.0.9
func (*Terminal) FnClearScreen ¶ added in v1.0.10
func (t *Terminal) FnClearScreen()
func (*Terminal) FnDeleteLastLine ¶ added in v1.0.10
func (t *Terminal) FnDeleteLastLine()
func (*Terminal) FnExitProgram ¶ added in v1.0.10
func (t *Terminal) FnExitProgram()
func (*Terminal) Get ¶
func (t *Terminal) Get(data ...string) TerminalResponse
func (*Terminal) GetAdjustedLine ¶ added in v1.0.13
func (*Terminal) GetHistory ¶ added in v1.0.9
func (*Terminal) GetHistoryAt ¶ added in v1.0.9
func (*Terminal) PasteClipboard ¶ added in v1.0.10
func (*Terminal) PrintError ¶ added in v1.0.10
func (*Terminal) PrintHistory ¶ added in v1.0.9
func (*Terminal) PrintSuccess ¶ added in v1.0.10
func (*Terminal) PrintWarning ¶ added in v1.0.10
type TerminalResponse ¶
type TerminalResponse struct { Command string Params map[string]interface{} RawInput string Type TerminalResponseType CtrlKey byte Error error }
func (*TerminalResponse) GetParam ¶ added in v1.0.9
func (tr *TerminalResponse) GetParam(name string, defaultValue interface{}) interface{}
type TerminalResponseType ¶
type TerminalResponseType int
const ( Cmd TerminalResponseType = iota OsCmd CtrlKey CmdHelp CmdError ParamError ExecutionError )
type TerminalStyles ¶ added in v1.0.10
type TerminalStyles struct { Prompt string PromptColor gu.Color ForegroundColor gu.Color ForegroundSuggestions gu.Color BackgroundColor gu.BgColor SelForegroundColor gu.Color SelBackgroundColor gu.BgColor HelpTextForeground gu.Color HelpTitlesForeground gu.Color HelpCommandForeground gu.Color HelpParamsForeground gu.Color HelpRequiredForeground gu.Color HelpLineColor gu.Color Cursor gu.Cursor }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.