Documentation
¶
Overview ¶
Package editline provides Go bindings for editline.
Index ¶
- func AddHistroy(line string)
- func Initialize()
- func ReadHistroy(filename string) error
- func ReadLine(prompt string) (string, error)
- func SetCompleteFunc(f CompleteFunc)
- func SetHistSize(i int)
- func SetListPossibFunc(f ListPossibFunc)
- func SetNoEcho(b bool)
- func SetNoHist(b bool)
- func Uninitialize()
- func WriteHistroy(filename string) error
- type CompleteFunc
- type ListPossibFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize()
Initialize initializes the editline library.
There is no need to call it manually as it will be initialized automatically.
func ReadHistroy ¶
ReadHistroy reads the editline history from a file.
func ReadLine ¶
ReadLine displays the given prompt on stdout, waits for user input on stdin and then returns a line of text with the trailing newline removed.
Each line returned is automatically saved in the internal history list, unless it happens to be equal to the previous line.
func SetCompleteFunc ¶
func SetCompleteFunc(f CompleteFunc)
SetCompleteFunc sets the complete function that will be called during tab completion.
func SetListPossibFunc ¶
func SetListPossibFunc(f ListPossibFunc)
SetListPossibFunc sets the list possibilities function that will be called during tab completion.
func SetNoEcho ¶
func SetNoEcho(b bool)
SetNoEcho sets whether or not to echo the input in the terminal.
func SetNoHist ¶
func SetNoHist(b bool)
SetNoHist sets whether or not to enable auto-save and access to history.
func WriteHistroy ¶
WriteHistroy writes the editline history to a file.
Types ¶
type CompleteFunc ¶
CompleteFunc equals rl_complete_func_t.
type ListPossibFunc ¶
ListPossibFunc equals rl_list_possib_func_t.