Documentation
¶
Index ¶
- func AddHistory(line string)
- func ClearHistory()
- func CompleterWordBreakCharacters() string
- func CompleterWordBreakCharacters_(break_chars string)
- func CompletionMatches(text string, entry_func func(text string, state int) string) []string
- func GetKeymapNameFromEditMode() string
- func HistoryBase() int
- func HistoryBase_(base int) int
- func HistoryCommentChar() rune
- func HistoryCommentChar_(c rune) rune
- func HistoryExpansionChar() rune
- func HistoryExpansionChar_(c rune) rune
- func HistoryIsStifled() bool
- func HistoryLength() int
- func HistoryMaxEntries() int
- func HistorySetPos(pos int)
- func HistorySubstChar() rune
- func HistorySubstChar_(c rune) rune
- func HistoryTotalBytes() int
- func LineBuffer() string
- func ParseAndBind(s string) bool
- func ReReadInitFile() error
- func ReadHistory(filename string) int
- func ReadInitFile(filename string) error
- func Readline(prompt string, add_history ...bool) (string, error)
- func RemoveHistory(which int) error
- func Rl_deprep_terminal()
- func Rl_ding() int
- func Rl_gnu_readline_p() bool
- func Rl_insert_mode() bool
- func Rl_insert_mode_set(set_insert bool) bool
- func Rl_prefer_env_winsize() int
- func Rl_prep_terminal(meta_flag int)
- func Rl_read_init_file(filename string) int
- func Rl_readline_library_version() string
- func Rl_readline_name() string
- func Rl_readline_terminal_name() string
- func Rl_readline_version() int
- func Rl_reset_terminal(terminal_name string) int
- func Rl_resize_terminal()
- func Rl_variable_value(variable string) string
- func SetAttemptedCompletionFunction(entry_func func(text string, start, end int) []string)
- func SetKeymapNameFromEditMode()
- func StifleHistory(max int)
- func UnstifleHistory() int
- func UsingHistory()
- func WhereHistory() int
- func WriteHistory(filename string) int
- type EditingMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHistory ¶
func AddHistory(line string)
Place LINE at the end of the history list.
The associated data field (if any) is set to NULL.
func CompleterWordBreakCharacters ¶
func CompleterWordBreakCharacters() string
The list of characters that signal a break between words. The default list is the contents of rl_basic_word_break_characters.
func CompleterWordBreakCharacters_ ¶
func CompleterWordBreakCharacters_(break_chars string)
Setter for CompleteWordBreakCharacters
func CompletionMatches ¶
func GetKeymapNameFromEditMode ¶
func GetKeymapNameFromEditMode() string
*** Should we include? ****
func HistoryBase ¶
func HistoryBase() int
The logical `base' of the history array. It defaults to 1.
func HistoryCommentChar ¶
func HistoryCommentChar() rune
During tokenization, if this character is seen as the first character
of a word, then it, and all subsequent characters upto a newline are ignored. For a Bourne shell, this should be '#'. Bash special cases the interactive comment character to not be a comment delimiter.
func HistoryExpansionChar ¶
func HistoryExpansionChar() rune
The character that represents the start of a history expansion
request. This is usually `!'.
func HistoryExpansionChar_ ¶
Setter for HistoryExpansionChar
func HistoryIsStifled ¶
func HistoryIsStifled() bool
Return true if the history is stifled, false if it is not.
func HistoryLength ¶
func HistoryLength() int
The number of strings currently stored in the history list.
func HistoryMaxEntries ¶
func HistoryMaxEntries() int
If HISTORY_STIFLED is non-zero, then this is the maximum number of
entries to remember.
func HistorySubstChar ¶
func HistorySubstChar() rune
The character that represents the start of a history expansion
request. This is usually `!'.
func HistoryTotalBytes ¶
func HistoryTotalBytes() int
Return the number of bytes that the primary history entries are using.
This just adds up the lengths of the_history->lines.
func LineBuffer ¶
func LineBuffer() string
func ParseAndBind ¶
Read the binding command from STRING and perform it. A key binding command looks like: Keyname: function-name\0, a variable binding command looks like: set variable value. A new-style keybinding looks like "\C-x\C-x": exchange-point-and-mark.
True is returned if there wasn't an error, false otherwise.
func ReadHistory ¶
Add the contents of FILENAME to the history list, a line at a time.
If FILENAME is '', then read from ~/.history. Returns 0 if successful, or errno if not.
func ReadInitFile ¶
func Readline ¶
Readline will read a line from the terminal and return it, using prompt as a prompt. If prompt the empty string, no prompt is issued. The line returned has the final newline removed, so only the text of the line remains.
Readline offers editing capabilities while the user is entering the line. By default, the line editing commands are similar to those of emacs. A vi-style line editing interface is also available.
func RemoveHistory ¶
RemoveHistory removes the history entry "which". The removed element is free'd
func Rl_deprep_terminal ¶
func Rl_deprep_terminal()
Undo the effects of `rl_prep_terminal()', leaving the terminal in the state in which it was before the most recent call to `rl_prep_terminal()'.
func Rl_gnu_readline_p ¶
func Rl_gnu_readline_p() bool
True if this is real GNU readline. (It's probably true here.)
func Rl_insert_mode ¶
func Rl_insert_mode() bool
Insert or overwrite mode for emacs mode. 1 means insert mode; 0 means
overwrite mode. Reset to insert mode on each input line.
func Rl_insert_mode_set ¶
func Rl_prefer_env_winsize ¶
func Rl_prefer_env_winsize() int
If non-zero, Readline gives values found in the `LINES' and `COLUMNS' environment variables greater precedence than values fetched from the kernel when computing the screen dimensions.
func Rl_prep_terminal ¶
func Rl_prep_terminal(meta_flag int)
Modify the terminal settings for Readline's use, so `readline()' can read a single character at a time from the keyboard. The META_FLAG argument should be non-zero if Readline should read eight-bit input.
func Rl_read_init_file ¶
Read keybindings and variable assignments from FILENAME
func Rl_readline_library_version ¶
func Rl_readline_library_version() string
The version number of this revision of the library. e.g. "6.2"
func Rl_readline_name ¶
func Rl_readline_name() string
This variable is set to a unique name by each application using Readline. The value allows conditional parsing of the inputrc file
func Rl_readline_terminal_name ¶
func Rl_readline_terminal_name() string
The terminal type, used for initialization. If not set by the application, Readline sets this to the value of the `TERM' environment variable the first time it is called.
func Rl_readline_version ¶
func Rl_readline_version() int
An integer encoding the current version of the library. The encoding is of the form 0xMMMM, where MM is the two-digit major version number, and MM is the two-digit minor version number. For example, for Readline-4.2, `rl_readline_version' would have the value 0x0402.
func Rl_reset_terminal ¶
Reinitialize Readline's idea of the terminal settings using TERMINAL_NAME as the terminal type (e.g., `vt100'). If TERMINAL_NAME is the empty string, the value of the `TERM' environment variable is used.
func Rl_resize_terminal ¶
func Rl_resize_terminal()
Update Readline's internal screen size by reading values from the kernel.
func Rl_variable_value ¶
Return a string representing the value of the Readline variable VARIABLE. For boolean variables, this string is either `on' or `off'.
func SetKeymapNameFromEditMode ¶
func SetKeymapNameFromEditMode()
func StifleHistory ¶
func StifleHistory(max int)
Stifle the history list, remembering only MAX number of entries.
func UnstifleHistory ¶
func UnstifleHistory() int
Stop stifling the history. This returns the previous amount the
history was stifled by. The value is positive if the history was stifled, negative if it wasn't.
func UsingHistory ¶
func UsingHistory()
Begin a session in which the history functions might be used. This
just initializes the interactive variables.
func WhereHistory ¶
func WhereHistory() int
Returns the number which says what history element we are now
looking at.
func WriteHistory ¶
Write the current history to FILENAME. If FILENAME is "",
then write the history list to ~/.history. Values returned are as in ReadHistory().
Types ¶
type EditingMode ¶
type EditingMode int
const ( Vi EditingMode = 0 Emacs EditingMode = 1 )
func Rl_editing_mode ¶
func Rl_editing_mode() EditingMode
Says which editing mode readline is currently using: Emacs or Vi
func Rl_editing_mode_set ¶
func Rl_editing_mode_set(new_value EditingMode) EditingMode
Set editing mode readline is currently using. 1 means emacs mode;
0 means vi mode.
