llvm::LineEditor

Interactive line editor with history and tab completion.

Synopsis

Declared in <llvm/LineEditor/LineEditor.h>

class LineEditor;

Types

NameDescription
Completion A possible completion at a given cursor position.
CompletionAction The action to perform upon a completion request.
InternalData Internal implementation data shared with LineEditor.cpp callbacks.

Member Functions

NameDescription
LineEditor [constructor]Create a LineEditor object.
~LineEditor [destructor]Destroy the LineEditor and release its resources.
getCompletionAction Use the current completer to produce a CompletionAction for the given completion request.
getPrompt Return the current prompt string.
loadHistory Load command history from the history file.
readLine Reads a line.
saveHistory Persist the current command history to the history file.
setCompleter Set the completer for this LineEditor.
setHistorySize Set the maximum number of history entries to retain.
setListCompleter Set the completer for this LineEditor to the given list completer.
setPrompt Set the prompt string shown before each input line.

Static Member Functions

NameDescription
getDefaultHistoryPath Return the default history file path for the given program name.