Documentation
¶
Index ¶
- Variables
- func InitReadlineHistory(rl *readline.Instance, history []string)
- func NewLineEditor(prompt string, tabHandler func() string) (*lineEditor, error)
- func NewReadline(prompt string) (*readline.Instance, error)
- func ReadLine(prompt string) (string, error)
- func ReadLineWithHistory(prompt string, history []string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInterrupt = errors.New("interrupt")
Functions ¶
func InitReadlineHistory ¶
InitReadlineHistory 初始化 readline 实例的历史记录 Note: ergochat/readline uses SaveToHistory instead of SaveHistory
func NewLineEditor ¶ added in v0.3.2
func NewReadline ¶
NewReadline 创建持久化的 readline 实例 用于需要多次读取输入并保持历史记录的场景
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.