Package org.jline.reader.impl
Class LineReaderImpl
java.lang.Object
org.jline.reader.impl.LineReaderImpl
- All Implemented Interfaces:
Flushable
,LineReader
A reader for terminal applications. It supports custom tab-completion,
saveable command history, and command line editing.
- Author:
- Marc Prud'hommeaux, Jason Dillon, Guillaume Nodet
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enum
protected static enum
protected static class
protected static enum
Possible states in which the current readline operation may be in.protected static enum
Nested classes/interfaces inherited from interface org.jline.reader.LineReader
LineReader.Option, LineReader.RegionType, LineReader.SuggestionType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected final String
The application nameprotected LineReader.SuggestionType
protected final BindingReader
static final String
static final String
static final String
static final String
protected final Buffer
protected int
protected Completer
protected CompletionMatcher
protected int
static final long
static final String
static final long
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final String
static final String
static final String
static final String
static final String
static final int
static final String
static final int
static final String
protected Display
protected boolean
protected Expander
protected int
VI character findprotected int
protected int
static final String
static final String
protected Highlighter
protected History
protected Buffer
protected boolean
protected boolean
protected String
The terminal keys mappingprotected KillRing
protected final ReentrantLock
State lockprotected MaskingCallback
protected int
protected boolean
protected int
static final char
protected final Map
<LineReader.Option, Boolean> protected boolean
protected ParsedLine
protected Parser
protected Supplier
<AttributedString> protected AttributedString
protected boolean
protected LineReader.RegionType
protected int
Region stateprotected int
protected AttributedString
protected boolean
protected CharSequence
protected boolean
protected int
protected StringBuffer
protected final Size
protected boolean
protected int
protected final AtomicBoolean
protected LineReaderImpl.State
static final int
Deprecated.protected String
protected final Terminal
The terminal to useprotected int
protected LineReaderImpl.ViMoveMode
protected String
The vi yank bufferFields inherited from interface org.jline.reader.LineReader
ACCEPT_AND_HOLD, ACCEPT_AND_INFER_NEXT_HISTORY, ACCEPT_LINE, ACCEPT_LINE_AND_DOWN_HISTORY, AMBIGUOUS_BINDING, ARGUMENT_BASE, BACKWARD_CHAR, BACKWARD_DELETE_CHAR, BACKWARD_DELETE_WORD, BACKWARD_KILL_LINE, BACKWARD_KILL_WORD, BACKWARD_WORD, BEEP, BEGIN_PASTE, BEGINNING_OF_BUFFER_OR_HISTORY, BEGINNING_OF_HISTORY, BEGINNING_OF_LINE, BEGINNING_OF_LINE_HIST, BELL_STYLE, BIND_TTY_SPECIAL_CHARS, BLINK_MATCHING_PAREN, CALLBACK_FINISH, CALLBACK_INIT, CALLBACK_KEYMAP, CAPITALIZE_WORD, CHARACTER_SEARCH, CHARACTER_SEARCH_BACKWARD, CLEAR, CLEAR_SCREEN, COMMENT_BEGIN, COMPLETE_PREFIX, COMPLETE_WORD, COMPLETION_STYLE_BACKGROUND, COMPLETION_STYLE_DESCRIPTION, COMPLETION_STYLE_GROUP, COMPLETION_STYLE_LIST_BACKGROUND, COMPLETION_STYLE_LIST_DESCRIPTION, COMPLETION_STYLE_LIST_GROUP, COMPLETION_STYLE_LIST_SELECTION, COMPLETION_STYLE_LIST_STARTING, COMPLETION_STYLE_SELECTION, COMPLETION_STYLE_STARTING, COPY_PREV_WORD, COPY_REGION_AS_KILL, DELETE_CHAR, DELETE_CHAR_OR_LIST, DELETE_WORD, DIGIT_ARGUMENT, DISABLE_COMPLETION, DISABLE_HISTORY, DO_LOWERCASE_VERSION, DOWN_CASE_WORD, DOWN_HISTORY, DOWN_LINE, DOWN_LINE_OR_HISTORY, DOWN_LINE_OR_SEARCH, DUMB, EDIT_AND_EXECUTE_COMMAND, EDITING_MODE, EMACS, EMACS_BACKWARD_WORD, EMACS_EDITING_MODE, EMACS_FORWARD_WORD, END_OF_BUFFER_OR_HISTORY, END_OF_HISTORY, END_OF_LINE, END_OF_LINE_HIST, ERRORS, EXCHANGE_POINT_AND_MARK, EXECUTE_NAMED_CMD, EXPAND_HISTORY, EXPAND_OR_COMPLETE, EXPAND_OR_COMPLETE_PREFIX, EXPAND_WORD, FEATURES_MAX_BUFFER_SIZE, FOCUS_IN, FOCUS_OUT, FORWARD_CHAR, FORWARD_WORD, FRESH_LINE, HISTORY_BEGINNING_SEARCH_BACKWARD, HISTORY_BEGINNING_SEARCH_FORWARD, HISTORY_FILE, HISTORY_FILE_SIZE, HISTORY_IGNORE, HISTORY_INCREMENTAL_PATTERN_SEARCH_BACKWARD, HISTORY_INCREMENTAL_PATTERN_SEARCH_FORWARD, HISTORY_INCREMENTAL_SEARCH_BACKWARD, HISTORY_INCREMENTAL_SEARCH_FORWARD, HISTORY_SEARCH_BACKWARD, HISTORY_SEARCH_FORWARD, HISTORY_SIZE, INDENTATION, INFER_NEXT_HISTORY, INPUT_RC_FILE_NAME, INSERT_CLOSE_CURLY, INSERT_CLOSE_PAREN, INSERT_CLOSE_SQUARE, INSERT_COMMENT, INSERT_LAST_WORD, KEYMAP, KILL_BUFFER, KILL_LINE, KILL_REGION, KILL_WHOLE_LINE, KILL_WORD, LINE_OFFSET, LIST_CHOICES, LIST_EXPAND, LIST_MAX, MAGIC_SPACE, MAIN, MAX_REPEAT_COUNT, MENU, MENU_COMPLETE, MENU_EXPAND_OR_COMPLETE, MENU_LIST_MAX, MENU_SELECT, MOUSE, NEG_ARGUMENT, ORIGINAL_GROUP_NAME, OTHERS_GROUP_NAME, OVERWRITE_MODE, PREFER_VISIBLE_BELL, PROP_SUPPORT_PARSEDLINE, PUT_REPLACE_SELECTION, QUOTED_INSERT, READ_COMMAND, RECURSIVE_EDIT, REDISPLAY, REDO, REDRAW_LINE, REMOVE_SUFFIX_CHARS, REVERSE_MENU_COMPLETE, SAFE, SEARCH_TERMINATORS, SECONDARY_PROMPT_PATTERN, SELF_INSERT, SELF_INSERT_UNMETA, SEND_BREAK, SET_LOCAL_HISTORY, SET_MARK_COMMAND, SPELL_WORD, SPLIT_UNDO, SUGGESTIONS_MIN_BUFFER_SIZE, SYSTEM_PROPERTY_PREFIX, TRANSPOSE_CHARS, TRANSPOSE_WORDS, UNDEFINED_KEY, UNDO, UNIVERSAL_ARGUMENT, UP_CASE_WORD, UP_HISTORY, UP_LINE, UP_LINE_OR_HISTORY, UP_LINE_OR_SEARCH, VI_ADD_EOL, VI_ADD_NEXT, VI_BACKWARD_BLANK_WORD, VI_BACKWARD_BLANK_WORD_END, VI_BACKWARD_CHAR, VI_BACKWARD_DELETE_CHAR, VI_BACKWARD_KILL_WORD, VI_BACKWARD_WORD, VI_BACKWARD_WORD_END, VI_BEGINNING_OF_LINE, VI_CHANGE, VI_CHANGE_EOL, VI_CHANGE_WHOLE_LINE, VI_CMD_MODE, VI_DELETE, VI_DELETE_CHAR, VI_DIGIT_OR_BEGINNING_OF_LINE, VI_DOWN_LINE_OR_HISTORY, VI_END_OF_LINE, VI_FETCH_HISTORY, VI_FIND_NEXT_CHAR, VI_FIND_NEXT_CHAR_SKIP, VI_FIND_PREV_CHAR, VI_FIND_PREV_CHAR_SKIP, VI_FIRST_NON_BLANK, VI_FORWARD_BLANK_WORD, VI_FORWARD_BLANK_WORD_END, VI_FORWARD_CHAR, VI_FORWARD_WORD, VI_FORWARD_WORD_END, VI_GOTO_COLUMN, VI_HISTORY_SEARCH_BACKWARD, VI_HISTORY_SEARCH_FORWARD, VI_INSERT, VI_INSERT_BOL, VI_INSERT_COMMENT, VI_JOIN, VI_KILL_EOL, VI_KILL_LINE, VI_MATCH_BRACKET, VI_OPEN_LINE_ABOVE, VI_OPEN_LINE_BELOW, VI_OPER_SWAP_CASE, VI_PUT_AFTER, VI_PUT_BEFORE, VI_QUOTED_INSERT, VI_REPEAT_CHANGE, VI_REPEAT_FIND, VI_REPEAT_SEARCH, VI_REPLACE, VI_REPLACE_CHARS, VI_REV_REPEAT_FIND, VI_REV_REPEAT_SEARCH, VI_SET_BUFFER, VI_SUBSTITUTE, VI_SWAP_CASE, VI_UNDO_CHANGE, VI_UP_LINE_OR_HISTORY, VI_YANK, VI_YANK_EOL, VI_YANK_WHOLE_LINE, VICMD, VIINS, VIOPP, VISUAL, VISUAL_LINE_MODE, VISUAL_MODE, WHAT_CURSOR_POSITION, WORDCHARS, YANK, YANK_POP
-
Constructor Summary
ConstructorsConstructorDescriptionLineReaderImpl
(Terminal terminal) LineReaderImpl
(Terminal terminal, String appName) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected boolean
protected boolean
protected boolean
void
addCommandsInBuffer
(Collection<String> commands) protected boolean
protected boolean
protected boolean
protected boolean
boolean
protected boolean
protected boolean
boolean
beep()
Issue an audible keyboard bell.protected boolean
protected boolean
protected boolean
protected boolean
boolean
protected AttributedStyle
buildStyle
(String str) void
callWidget
(String name) protected boolean
protected void
cleanup()
boolean
clear()
Clean the used displayprotected boolean
boolean
Clear the screen by issuing the ANSI "clear screen" code.protected boolean
protected boolean
protected LineReaderImpl.PostResult
computePost
(List<Candidate> possible, Candidate selection, List<Candidate> ordered, String completed) protected LineReaderImpl.PostResult
computePost
(List<Candidate> possible, Candidate selection, List<Candidate> ordered, String completed, Function<String, Integer> wcwidth, int width, boolean autoGroup, boolean groupName, boolean rowsFirst) protected boolean
boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected void
doCleanup
(boolean nl) protected boolean
doComplete
(LineReaderImpl.CompletionType lst, boolean useMenu, boolean prefix) protected boolean
doComplete
(LineReaderImpl.CompletionType lst, boolean useMenu, boolean prefix, boolean forSuggestion) protected boolean
doInsertComment
(boolean isViMode) protected boolean
doList
(List<Candidate> possible, String completed, boolean runLoop, BiFunction<CharSequence, Boolean, CharSequence> escaper) protected boolean
doList
(List<Candidate> possible, String completed, boolean runLoop, BiFunction<CharSequence, Boolean, CharSequence> escaper, boolean forSuggestion) protected boolean
protected boolean
doMenu
(List<Candidate> original, String completed, BiFunction<CharSequence, Boolean, CharSequence> escaper) protected <T> T
doReadBinding
(KeyMap<T> keys, KeyMap<T> local) protected String
doReadStringUntil
(String sequence) protected boolean
doSearchHistory
(boolean backward) protected boolean
doViDeleteOrChange
(int startPos, int endPos, boolean isChange) Performs the vi "delete-to" action, deleting characters between a given span of the input line.protected boolean
Implements vi style bracket matching ("%" command).protected boolean
protected boolean
protected boolean
downLine()
protected boolean
protected boolean
dumb()
void
editAndAddInBuffer
(File file) protected boolean
emacs()
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected String
protected String
Clear the buffer and add its contents to the history.void
flush()
Flush the terminal output stream.boolean
focusIn()
boolean
focusOut()
protected boolean
protected boolean
protected boolean
protected int
getBracketType
(int ch) Given a character determines what type of bracket it is (paren, square, curly, or none).protected Comparator
<Candidate> getCandidateComparator
(boolean caseInsensitive, String word) Returns the completer.protected AttributedStyle
getCompletionStyle
(String name, String value) protected AttributedStyle
protected AttributedStyle
getCompletionStyleBackground
(boolean menuList) protected AttributedStyle
protected AttributedStyle
getCompletionStyleDescription
(boolean menuList) protected AttributedStyle
protected AttributedStyle
getCompletionStyleGroup
(boolean menuList) protected AttributedStyle
protected AttributedStyle
protected AttributedStyle
protected AttributedStyle
protected AttributedStyle
protected AttributedStyle
protected AttributedStyle
getCompletionStyleSelection
(boolean menuList) protected AttributedStyle
protected AttributedStyle
getCompletionStyleStarting
(boolean menuList) getDisplayedBufferWithPrompts
(List<AttributedString> secondaryPrompts) Compute the full string to be displayed with the left, right and secondary promptsprotected Comparator
<String> Returns the name of the current key mapping.getKeys()
protected String
protected String
int
protected int
getVariable
(String name) protected Widget
protected void
handleSignal
(Terminal.Signal signal) protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
isAlpha
(int c) protected boolean
isDelimiter
(int c) Checks to see if the specified character is a delimiter.protected boolean
protected boolean
protected boolean
boolean
boolean
Check if a thread is currently in areadLine()
call.boolean
isSet
(LineReader.Option option) protected boolean
isViAlphaNum
(int c) protected boolean
isWhitespace
(int c) Checks to see if a character is a whitespace character.protected boolean
isWord
(int c) protected boolean
boolean
killLine()
Kill the buffer ahead of the current cursor position.boolean
protected boolean
protected boolean
killWord()
protected boolean
menu()
protected boolean
protected boolean
boolean
mouse()
protected boolean
moveHistory
(boolean next) Move up or down the history tree.protected boolean
moveHistory
(boolean next, int count) Used in "vi" mode for argumented history move, to move a specific number of history entries forward or back.protected boolean
protected boolean
option
(LineReader.Option option, boolean value) protected boolean
int
peekCharacter
(long timeout) void
printAbove
(String str) Prints a line above the prompt and redraw everything.void
Prints a string before the prompt and redraw everything.void
putString
(CharSequence str) Write out the specified string to the buffer and the output stream.protected boolean
quit()
protected boolean
readBinding
(KeyMap<Binding> keys) Read from the input stream and decode an operation from the key map.readBinding
(KeyMap<Binding> keys, KeyMap<Binding> local) int
Read a character from the terminal.readLine()
Read the next line and return the contents of the buffer.Read the next line with the specified character mask.Read a line from the inInputStream
, and return the line (without any trailing newlines).Read a line from the inInputStream
, and return the line (without any trailing newlines).Read a line from the inInputStream
, and return the line (without any trailing newlines).Read a line from the inInputStream
, and return the line (without any trailing newlines).readLine
(String prompt, String rightPrompt, MaskingCallback maskingCallback, String buffer) Read a line from the inInputStream
, and return the line (without any trailing newlines).Read a mouse event when theInfoCmp.Capability.key_mouse
sequence has just been read on the input stream.boolean
protected void
redisplay
(boolean flush) protected boolean
redo()
boolean
Clear the line and redraw it.void
Push back a key sequence that will be later consumed by the line reader.safe()
int
searchBackwards
(String searchTerm) Search backwards in history from the current position.int
searchBackwards
(String searchTerm, int startIndex) Search backward in history from a given position.int
searchBackwards
(String searchTerm, int startIndex, boolean startsWith) int
searchForwards
(String searchTerm) Search forwards in history from the current position.int
searchForwards
(String searchTerm, int startIndex) Search forward in history from a given position.int
searchForwards
(String searchTerm, int startIndex, boolean startsWith) protected boolean
protected boolean
protected boolean
void
protected void
Set the current buffer's content to the specifiedString
.protected void
void
setCompleter
(Completer completer) Set the completer.void
setCompletionMatcher
(CompletionMatcher completionMatcher) void
setExpander
(Expander expander) void
setHighlighter
(Highlighter highlighter) void
setHistory
(History history) boolean
Sets the current keymap by name.protected boolean
void
setOpt
(LineReader.Option option) void
void
void
setRightPrompt
(String rightPrompt) void
setTailTip
(String tailTip) void
setVariable
(String name, Object value) protected int
switchCase
(int ch) protected void
toColumns
(Object items, int width, int maxWidth, AttributedStringBuilder sb, Candidate selection, String completed, boolean rowsFirst, boolean doMenuList, int[] out) protected LineReaderImpl.PostResult
toColumns
(List<Object> items, Candidate selection, String completed, Function<String, Integer> wcwidth, int width, boolean rowsFirst) protected boolean
Performs character transpose.protected boolean
protected boolean
protected boolean
undo()
protected boolean
void
unsetOpt
(LineReader.Option option) protected boolean
protected boolean
protected boolean
upLine()
protected boolean
protected boolean
protected boolean
viAddEol()
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
Deletes the previous character from the cursor positionprotected boolean
protected boolean
protected boolean
protected boolean
protected boolean
viChange()
protected boolean
viChange
(int startPos, int endPos) protected boolean
protected boolean
viCmd()
protected boolean
protected boolean
viDelete()
protected String
This method is calling while doing a delete-to ("d"), change-to ("c"), or yank-to ("y") and it filters out only those movement operations that are allowable during those operations.protected boolean
Deletes the character you are sitting on and sucks the rest of the line in from the right.protected boolean
viDeleteTo
(int startPos, int endPos) protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
Implements vi search ("/" or "?").protected boolean
viInsert()
protected boolean
protected boolean
protected boolean
viJoin()
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
viOpp()
protected boolean
Pasts the yank buffer to the right of the current cursor position and moves the cursor to the end of the pasted region.protected boolean
protected boolean
protected boolean
protected boolean
Implements the vi change character command (in move-mode "r" followed by the character to change to).protected boolean
protected boolean
visual()
protected boolean
protected boolean
protected boolean
Switches the case of the current character from upper to lower or lower to upper as necessary and advances the cursor one position to the right.protected boolean
protected boolean
viYankTo()
protected boolean
viYankTo
(int startPos, int endPos) Implement the "vi" yank-to operation.protected boolean
protected boolean
protected static CompletingParsedLine
wrap
(ParsedLine line) boolean
yank()
boolean
yankPop()
void
zeroOut()
Clear any internal buffers.
-
Field Details
-
NULL_MASK
public static final char NULL_MASK- See Also:
-
TAB_WIDTH
Deprecated.useDEFAULT_TAB_WIDTH
andgetTabWidth()
- See Also:
-
DEFAULT_TAB_WIDTH
public static final int DEFAULT_TAB_WIDTH- See Also:
-
DEFAULT_WORDCHARS
- See Also:
-
DEFAULT_REMOVE_SUFFIX_CHARS
- See Also:
-
DEFAULT_COMMENT_BEGIN
- See Also:
-
DEFAULT_SEARCH_TERMINATORS
- See Also:
-
DEFAULT_BELL_STYLE
- See Also:
-
DEFAULT_LIST_MAX
public static final int DEFAULT_LIST_MAX- See Also:
-
DEFAULT_MENU_LIST_MAX
public static final int DEFAULT_MENU_LIST_MAX- See Also:
-
DEFAULT_ERRORS
public static final int DEFAULT_ERRORS- See Also:
-
DEFAULT_BLINK_MATCHING_PAREN
public static final long DEFAULT_BLINK_MATCHING_PAREN- See Also:
-
DEFAULT_AMBIGUOUS_BINDING
public static final long DEFAULT_AMBIGUOUS_BINDING- See Also:
-
DEFAULT_SECONDARY_PROMPT_PATTERN
- See Also:
-
DEFAULT_OTHERS_GROUP_NAME
- See Also:
-
DEFAULT_ORIGINAL_GROUP_NAME
- See Also:
-
DEFAULT_COMPLETION_STYLE_STARTING
- See Also:
-
DEFAULT_COMPLETION_STYLE_DESCRIPTION
- See Also:
-
DEFAULT_COMPLETION_STYLE_GROUP
- See Also:
-
DEFAULT_COMPLETION_STYLE_SELECTION
- See Also:
-
DEFAULT_COMPLETION_STYLE_BACKGROUND
- See Also:
-
DEFAULT_COMPLETION_STYLE_LIST_STARTING
- See Also:
-
DEFAULT_COMPLETION_STYLE_LIST_DESCRIPTION
- See Also:
-
DEFAULT_COMPLETION_STYLE_LIST_GROUP
- See Also:
-
DEFAULT_COMPLETION_STYLE_LIST_SELECTION
- See Also:
-
DEFAULT_COMPLETION_STYLE_LIST_BACKGROUND
- See Also:
-
DEFAULT_INDENTATION
public static final int DEFAULT_INDENTATION- See Also:
-
DEFAULT_FEATURES_MAX_BUFFER_SIZE
public static final int DEFAULT_FEATURES_MAX_BUFFER_SIZE- See Also:
-
DEFAULT_SUGGESTIONS_MIN_BUFFER_SIZE
public static final int DEFAULT_SUGGESTIONS_MIN_BUFFER_SIZE- See Also:
-
DEFAULT_SYSTEM_PROPERTY_PREFIX
- See Also:
-
BRACKETED_PASTE_ON
- See Also:
-
BRACKETED_PASTE_OFF
- See Also:
-
BRACKETED_PASTE_BEGIN
- See Also:
-
BRACKETED_PASTE_END
- See Also:
-
FOCUS_IN_SEQ
- See Also:
-
FOCUS_OUT_SEQ
- See Also:
-
DEFAULT_MAX_REPEAT_COUNT
public static final int DEFAULT_MAX_REPEAT_COUNT- See Also:
-
terminal
The terminal to use -
appName
The application name -
keyMaps
The terminal keys mapping -
variables
-
history
-
completer
-
highlighter
-
parser
-
expander
-
completionMatcher
-
options
-
buf
-
tailTip
-
autosuggestion
-
size
-
prompt
-
rightPrompt
-
maskingCallback
-
modifiedHistory
-
historyBuffer
-
searchBuffer
-
searchTerm
-
searchFailing
protected boolean searchFailing -
searchBackward
protected boolean searchBackward -
searchIndex
protected int searchIndex -
doAutosuggestion
protected boolean doAutosuggestion -
bindingReader
-
findChar
protected int findCharVI character find -
findDir
protected int findDir -
findTailAdd
protected int findTailAdd -
regionMark
protected int regionMarkRegion state -
regionActive
-
yankBuffer
The vi yank buffer -
viMoveMode
-
killRing
-
undo
-
isUndo
protected boolean isUndo -
lock
State lock -
state
-
startedReading
-
reading
protected boolean reading -
post
-
builtinWidgets
-
widgets
-
count
protected int count -
mult
protected int mult -
universal
protected int universal -
repeatCount
protected int repeatCount -
isArgDigit
protected boolean isArgDigit -
parsedLine
-
skipRedisplay
protected boolean skipRedisplay -
display
-
overTyping
protected boolean overTyping -
keyMap
-
smallTerminalOffset
protected int smallTerminalOffset -
nextCommandFromHistory
protected boolean nextCommandFromHistory -
nextHistoryId
protected int nextHistoryId -
commandsBuffer
-
candidateStartPosition
protected int candidateStartPosition -
alternateIn
-
alternateOut
-
-
Constructor Details
-
LineReaderImpl
- Throws:
IOException
-
LineReaderImpl
- Throws:
IOException
-
LineReaderImpl
-
-
Method Details
-
getTerminal
- Specified by:
getTerminal
in interfaceLineReader
-
getAppName
- Specified by:
getAppName
in interfaceLineReader
-
getKeyMaps
- Specified by:
getKeyMaps
in interfaceLineReader
-
getKeys
- Specified by:
getKeys
in interfaceLineReader
-
getWidgets
- Specified by:
getWidgets
in interfaceLineReader
-
getBuiltinWidgets
- Specified by:
getBuiltinWidgets
in interfaceLineReader
-
getBuffer
- Specified by:
getBuffer
in interfaceLineReader
-
setAutosuggestion
- Specified by:
setAutosuggestion
in interfaceLineReader
-
getAutosuggestion
- Specified by:
getAutosuggestion
in interfaceLineReader
-
getTailTip
- Specified by:
getTailTip
in interfaceLineReader
-
setTailTip
- Specified by:
setTailTip
in interfaceLineReader
-
runMacro
Description copied from interface:LineReader
Push back a key sequence that will be later consumed by the line reader. This method can be used after reading the cursor position usingTerminal.getCursorPosition(IntConsumer)
.- Specified by:
runMacro
in interfaceLineReader
- Parameters:
macro
- the key sequence to push back- See Also:
-
readMouseEvent
Description copied from interface:LineReader
Read a mouse event when theInfoCmp.Capability.key_mouse
sequence has just been read on the input stream. Compared toTerminal.readMouseEvent()
, this method takes into account keys that have been pushed back usingLineReader.runMacro(String)
.- Specified by:
readMouseEvent
in interfaceLineReader
- Returns:
- the mouse event
- See Also:
-
setCompleter
Set the completer.- Parameters:
completer
- the completer to use
-
getCompleter
Returns the completer.- Returns:
- the completer
-
setHistory
-
getHistory
- Specified by:
getHistory
in interfaceLineReader
-
setHighlighter
-
getHighlighter
- Specified by:
getHighlighter
in interfaceLineReader
-
getParser
- Specified by:
getParser
in interfaceLineReader
-
setParser
-
getExpander
- Specified by:
getExpander
in interfaceLineReader
-
setExpander
-
setCompletionMatcher
-
readLine
Read the next line and return the contents of the buffer.- Specified by:
readLine
in interfaceLineReader
- Returns:
- A line that is read from the terminal, can never be null.
- Throws:
UserInterruptException
- if readLine was interrupted (using Ctrl-C for example)EndOfFileException
- if an EOF has been found (using Ctrl-D for example)
-
readLine
Read the next line with the specified character mask. If null, then characters will be echoed. If 0, then no characters will be echoed.- Specified by:
readLine
in interfaceLineReader
- Parameters:
mask
- The mask character,null
or0
.- Returns:
- A line that is read from the terminal, can never be null.
- Throws:
UserInterruptException
- if readLine was interrupted (using Ctrl-C for example)EndOfFileException
- if an EOF has been found (using Ctrl-D for example)
-
readLine
Read a line from the inInputStream
, and return the line (without any trailing newlines).- Specified by:
readLine
in interfaceLineReader
- Parameters:
prompt
- The prompt to issue to the terminal, may be null.- Returns:
- A line that is read from the terminal, can never be null.
- Throws:
UserInterruptException
- if readLine was interrupted (using Ctrl-C for example)EndOfFileException
- if an EOF has been found (using Ctrl-D for example)
-
readLine
public String readLine(String prompt, Character mask) throws UserInterruptException, EndOfFileException Read a line from the inInputStream
, and return the line (without any trailing newlines).- Specified by:
readLine
in interfaceLineReader
- Parameters:
prompt
- The prompt to issue to the terminal, may be null.mask
- The mask character,null
or0
.- Returns:
- A line that is read from the terminal, can never be null.
- Throws:
UserInterruptException
- if readLine was interrupted (using Ctrl-C for example)EndOfFileException
- if an EOF has been found (using Ctrl-D for example)
-
readLine
public String readLine(String prompt, Character mask, String buffer) throws UserInterruptException, EndOfFileException Read a line from the inInputStream
, and return the line (without any trailing newlines).- Specified by:
readLine
in interfaceLineReader
- Parameters:
prompt
- The prompt to issue to the terminal, may be null.mask
- The mask character,null
or0
.buffer
- A string that will be set for editing.- Returns:
- A line that is read from the terminal, can never be null.
- Throws:
UserInterruptException
- if readLine was interrupted (using Ctrl-C for example)EndOfFileException
- if an EOF has been found (using Ctrl-D for example)
-
readLine
public String readLine(String prompt, String rightPrompt, Character mask, String buffer) throws UserInterruptException, EndOfFileException Read a line from the inInputStream
, and return the line (without any trailing newlines).- Specified by:
readLine
in interfaceLineReader
- Parameters:
prompt
- The prompt to issue to the terminal, may be null.rightPrompt
- The prompt to issue to the right of the terminal, may be null.mask
- The mask character,null
or0
.buffer
- A string that will be set for editing.- Returns:
- A line that is read from the terminal, can never be null.
- Throws:
UserInterruptException
- if readLine was interrupted (using Ctrl-C for example)EndOfFileException
- if an EOF has been found (using Ctrl-D for example)
-
readLine
public String readLine(String prompt, String rightPrompt, MaskingCallback maskingCallback, String buffer) throws UserInterruptException, EndOfFileException Read a line from the inInputStream
, and return the line (without any trailing newlines).- Specified by:
readLine
in interfaceLineReader
- Parameters:
prompt
- The prompt to issue to the terminal, may be null.rightPrompt
- The prompt to issue to the right of the terminal, may be null.maskingCallback
- The callback used to mask parts of the edited line.buffer
- A string that will be set for editing.- Returns:
- A line that is read from the terminal, can never be null.
- Throws:
UserInterruptException
- if readLine was interrupted (using Ctrl-C for example)EndOfFileException
- if an EOF has been found (using Ctrl-D for example)
-
printAbove
Description copied from interface:LineReader
Prints a line above the prompt and redraw everything. If the LineReader is not actually reading a line, the string will simply be printed to the terminal.- Specified by:
printAbove
in interfaceLineReader
- Parameters:
str
- the string to print- See Also:
-
printAbove
Description copied from interface:LineReader
Prints a string before the prompt and redraw everything. If the LineReader is not actually reading a line, the string will simply be printed to the terminal.- Specified by:
printAbove
in interfaceLineReader
- Parameters:
str
- the string to print- See Also:
-
isReading
public boolean isReading()Description copied from interface:LineReader
Check if a thread is currently in areadLine()
call.- Specified by:
isReading
in interfaceLineReader
- Returns:
true
if there is an ongoingreadLine()
call.
-
freshLine
protected boolean freshLine() -
callWidget
- Specified by:
callWidget
in interfaceLineReader
-
redrawLine
public boolean redrawLine()Clear the line and redraw it.- Returns:
true
-
putString
Write out the specified string to the buffer and the output stream.- Parameters:
str
- the char sequence to write in the buffer
-
flush
public void flush()Flush the terminal output stream. This is important for printout out single characters (like a buf.backspace or keyboard) that we want the terminal to handle immediately. -
isKeyMap
-
readCharacter
public int readCharacter()Read a character from the terminal.- Returns:
- the character, or -1 if an EOF is received.
-
peekCharacter
public int peekCharacter(long timeout) -
doReadBinding
-
doReadStringUntil
-
readBinding
Read from the input stream and decode an operation from the key map. The input stream will be read character by character until a matching binding can be found. Characters that can't possibly be matched to any binding will be discarded.- Parameters:
keys
- the KeyMap to use for decoding the input stream- Returns:
- the decoded binding or
null
if the end of stream has been reached
-
readBinding
-
getParsedLine
- Specified by:
getParsedLine
in interfaceLineReader
-
getLastBinding
- Specified by:
getLastBinding
in interfaceLineReader
-
getSearchTerm
- Specified by:
getSearchTerm
in interfaceLineReader
-
getRegionActive
- Specified by:
getRegionActive
in interfaceLineReader
-
getRegionMark
public int getRegionMark()- Specified by:
getRegionMark
in interfaceLineReader
-
setKeyMap
Sets the current keymap by name. Supported keymaps are "emacs", "viins", "vicmd".- Specified by:
setKeyMap
in interfaceLineReader
- Parameters:
name
- The name of the keymap to switch to- Returns:
- true if the keymap was set, or false if the keymap is not recognized.
-
getKeyMap
Returns the name of the current key mapping.- Specified by:
getKeyMap
in interfaceLineReader
- Returns:
- the name of the key mapping. This will be the canonical name
of the current mode of the key map and may not reflect the name that
was used with
setKeyMap(String)
.
-
variable
- Specified by:
variable
in interfaceLineReader
-
getVariables
- Specified by:
getVariables
in interfaceLineReader
-
getVariable
- Specified by:
getVariable
in interfaceLineReader
-
setVariable
- Specified by:
setVariable
in interfaceLineReader
-
option
- Specified by:
option
in interfaceLineReader
-
isSet
- Specified by:
isSet
in interfaceLineReader
-
setOpt
- Specified by:
setOpt
in interfaceLineReader
-
unsetOpt
- Specified by:
unsetOpt
in interfaceLineReader
-
addCommandsInBuffer
- Specified by:
addCommandsInBuffer
in interfaceLineReader
-
editAndAddInBuffer
- Specified by:
editAndAddInBuffer
in interfaceLineReader
- Throws:
Exception
-
getTabWidth
protected int getTabWidth() -
finishBuffer
Clear the buffer and add its contents to the history.- Returns:
- the former contents of the buffer.
-
finish
-
handleSignal
-
getWidget
-
setPrompt
-
setRightPrompt
-
setBuffer
-
setBuffer
Set the current buffer's content to the specifiedString
. The visual terminal will be modified to show the current buffer.- Parameters:
buffer
- the new contents of the buffer.
-
viDeleteChangeYankToRemap
This method is calling while doing a delete-to ("d"), change-to ("c"), or yank-to ("y") and it filters out only those movement operations that are allowable during those operations. Any operation that isn't allow drops you back into movement mode.- Parameters:
op
- The incoming operation to remap- Returns:
- The remaped operation
-
switchCase
protected int switchCase(int ch) -
isInViMoveOperation
protected boolean isInViMoveOperation()- Returns:
- true if line reader is in the middle of doing a change-to delete-to or yank-to.
-
isInViChangeOperation
protected boolean isInViChangeOperation() -
isInViCmdMode
protected boolean isInViCmdMode() -
viForwardChar
protected boolean viForwardChar() -
viBackwardChar
protected boolean viBackwardChar() -
forwardWord
protected boolean forwardWord() -
viForwardWord
protected boolean viForwardWord() -
viForwardBlankWord
protected boolean viForwardBlankWord() -
emacsForwardWord
protected boolean emacsForwardWord() -
viForwardBlankWordEnd
protected boolean viForwardBlankWordEnd() -
viForwardWordEnd
protected boolean viForwardWordEnd() -
backwardWord
protected boolean backwardWord() -
viBackwardWord
protected boolean viBackwardWord() -
viBackwardBlankWord
protected boolean viBackwardBlankWord() -
viBackwardWordEnd
protected boolean viBackwardWordEnd() -
viBackwardBlankWordEnd
protected boolean viBackwardBlankWordEnd() -
emacsBackwardWord
protected boolean emacsBackwardWord() -
backwardDeleteWord
protected boolean backwardDeleteWord() -
viBackwardKillWord
protected boolean viBackwardKillWord() -
backwardKillWord
protected boolean backwardKillWord() -
copyPrevWord
protected boolean copyPrevWord() -
upCaseWord
protected boolean upCaseWord() -
downCaseWord
protected boolean downCaseWord() -
capitalizeWord
protected boolean capitalizeWord() -
deleteWord
protected boolean deleteWord() -
killWord
protected boolean killWord() -
transposeWords
protected boolean transposeWords() -
insertComment
protected boolean insertComment() -
viInsertComment
protected boolean viInsertComment() -
doInsertComment
protected boolean doInsertComment(boolean isViMode) -
viFindNextChar
protected boolean viFindNextChar() -
viFindPrevChar
protected boolean viFindPrevChar() -
viFindNextCharSkip
protected boolean viFindNextCharSkip() -
viFindPrevCharSkip
protected boolean viFindPrevCharSkip() -
viRepeatFind
protected boolean viRepeatFind() -
viRevRepeatFind
protected boolean viRevRepeatFind() -
viHistorySearchForward
protected boolean viHistorySearchForward()Implements vi search ("/" or "?").- Returns:
true
if the search was successful
-
viHistorySearchBackward
protected boolean viHistorySearchBackward() -
viRepeatSearch
protected boolean viRepeatSearch() -
viRevRepeatSearch
protected boolean viRevRepeatSearch() -
insertCloseCurly
protected boolean insertCloseCurly() -
insertCloseParen
protected boolean insertCloseParen() -
insertCloseSquare
protected boolean insertCloseSquare() -
insertClose
-
viMatchBracket
protected boolean viMatchBracket() -
undefinedKey
protected boolean undefinedKey() -
doViMatchBracket
protected boolean doViMatchBracket()Implements vi style bracket matching ("%" command). The matching bracket for the current bracket type that you are sitting on is matched.- Returns:
- true if it worked, false if the cursor was not on a bracket character or if there was no matching bracket.
-
getBracketType
protected int getBracketType(int ch) Given a character determines what type of bracket it is (paren, square, curly, or none).- Parameters:
ch
- The character to check- Returns:
- 1 is square, 2 curly, 3 parent, or zero for none. The value will be negated if it is the closing form of the bracket.
-
transposeChars
protected boolean transposeChars()Performs character transpose. The character prior to the cursor and the character under the cursor are swapped and the cursor is advanced one. Do not cross line breaks.- Returns:
- true
-
undo
protected boolean undo() -
redo
protected boolean redo() -
sendBreak
protected boolean sendBreak() -
backwardChar
protected boolean backwardChar() -
forwardChar
protected boolean forwardChar() -
viDigitOrBeginningOfLine
protected boolean viDigitOrBeginningOfLine() -
universalArgument
protected boolean universalArgument() -
argumentBase
protected boolean argumentBase() -
negArgument
protected boolean negArgument() -
digitArgument
protected boolean digitArgument() -
viDelete
protected boolean viDelete() -
viYankTo
protected boolean viYankTo() -
viYankWholeLine
protected boolean viYankWholeLine() -
viChange
protected boolean viChange() -
cleanup
protected void cleanup() -
doCleanup
protected void doCleanup(boolean nl) -
historyIncrementalSearchForward
protected boolean historyIncrementalSearchForward() -
historyIncrementalSearchBackward
protected boolean historyIncrementalSearchBackward() -
doSearchHistory
protected boolean doSearchHistory(boolean backward) -
historySearchForward
protected boolean historySearchForward() -
historySearchBackward
protected boolean historySearchBackward() -
searchBackwards
Search backward in history from a given position.- Parameters:
searchTerm
- substring to search for.startIndex
- the index from which on to search- Returns:
- index where this substring has been found, or -1 else.
-
searchBackwards
Search backwards in history from the current position.- Parameters:
searchTerm
- substring to search for.- Returns:
- index where the substring has been found, or -1 else.
-
searchBackwards
-
searchForwards
-
searchForwards
Search forward in history from a given position.- Parameters:
searchTerm
- substring to search for.startIndex
- the index from which on to search- Returns:
- index where this substring has been found, or -1 else.
-
searchForwards
Search forwards in history from the current position.- Parameters:
searchTerm
- substring to search for.- Returns:
- index where the substring has been found, or -1 else.
-
quit
protected boolean quit() -
acceptAndHold
protected boolean acceptAndHold() -
acceptLineAndDownHistory
protected boolean acceptLineAndDownHistory() -
acceptAndInferNextHistory
protected boolean acceptAndInferNextHistory() -
acceptLine
protected boolean acceptLine() -
selfInsert
protected boolean selfInsert() -
selfInsertUnmeta
protected boolean selfInsertUnmeta() -
overwriteMode
protected boolean overwriteMode() -
beginningOfBufferOrHistory
protected boolean beginningOfBufferOrHistory() -
beginningOfHistory
protected boolean beginningOfHistory() -
endOfBufferOrHistory
protected boolean endOfBufferOrHistory() -
endOfHistory
protected boolean endOfHistory() -
beginningOfLineHist
protected boolean beginningOfLineHist() -
endOfLineHist
protected boolean endOfLineHist() -
upHistory
protected boolean upHistory() -
downHistory
protected boolean downHistory() -
viUpLineOrHistory
protected boolean viUpLineOrHistory() -
viDownLineOrHistory
protected boolean viDownLineOrHistory() -
upLine
protected boolean upLine() -
downLine
protected boolean downLine() -
upLineOrHistory
protected boolean upLineOrHistory() -
upLineOrSearch
protected boolean upLineOrSearch() -
downLineOrHistory
protected boolean downLineOrHistory() -
downLineOrSearch
protected boolean downLineOrSearch() -
viCmdMode
protected boolean viCmdMode() -
viInsert
protected boolean viInsert() -
viAddNext
protected boolean viAddNext() -
viAddEol
protected boolean viAddEol() -
emacsEditingMode
protected boolean emacsEditingMode() -
viChangeWholeLine
protected boolean viChangeWholeLine() -
viChangeEol
protected boolean viChangeEol() -
viKillEol
protected boolean viKillEol() -
quotedInsert
protected boolean quotedInsert() -
viJoin
protected boolean viJoin() -
viKillWholeLine
protected boolean viKillWholeLine() -
viInsertBol
protected boolean viInsertBol() -
backwardDeleteChar
protected boolean backwardDeleteChar() -
viFirstNonBlank
protected boolean viFirstNonBlank() -
viBeginningOfLine
protected boolean viBeginningOfLine() -
viEndOfLine
protected boolean viEndOfLine() -
beginningOfLine
protected boolean beginningOfLine() -
endOfLine
protected boolean endOfLine() -
deleteChar
protected boolean deleteChar() -
viBackwardDeleteChar
protected boolean viBackwardDeleteChar()Deletes the previous character from the cursor position- Returns:
true
if it succeeded,false
otherwise
-
viDeleteChar
protected boolean viDeleteChar()Deletes the character you are sitting on and sucks the rest of the line in from the right.- Returns:
true
if it succeeded,false
otherwise
-
viSwapCase
protected boolean viSwapCase()Switches the case of the current character from upper to lower or lower to upper as necessary and advances the cursor one position to the right.- Returns:
true
if it succeeded,false
otherwise
-
viReplaceChars
protected boolean viReplaceChars()Implements the vi change character command (in move-mode "r" followed by the character to change to).- Returns:
true
if it succeeded,false
otherwise
-
viChange
protected boolean viChange(int startPos, int endPos) -
viDeleteTo
protected boolean viDeleteTo(int startPos, int endPos) -
doViDeleteOrChange
protected boolean doViDeleteOrChange(int startPos, int endPos, boolean isChange) Performs the vi "delete-to" action, deleting characters between a given span of the input line.- Parameters:
startPos
- The start positionendPos
- The end position.isChange
- If true, then the delete is part of a change operationg (e.g. "c$" is change-to-end-of line, so we first must delete to end of line to start the change- Returns:
true
if it succeeded,false
otherwise
-
viYankTo
protected boolean viYankTo(int startPos, int endPos) Implement the "vi" yank-to operation. This operation allows you to yank the contents of the current line based upon a move operation, for example "yw" yanks the current word, "3yw" yanks 3 words, etc.- Parameters:
startPos
- The starting position from which to yankendPos
- The ending position to which to yank- Returns:
true
if the yank succeeded
-
viOpenLineAbove
protected boolean viOpenLineAbove() -
viOpenLineBelow
protected boolean viOpenLineBelow() -
viPutAfter
protected boolean viPutAfter()Pasts the yank buffer to the right of the current cursor position and moves the cursor to the end of the pasted region.- Returns:
true
-
viPutBefore
protected boolean viPutBefore() -
doLowercaseVersion
protected boolean doLowercaseVersion() -
setMarkCommand
protected boolean setMarkCommand() -
exchangePointAndMark
protected boolean exchangePointAndMark() -
visualMode
protected boolean visualMode() -
visualLineMode
protected boolean visualLineMode() -
deactivateRegion
protected boolean deactivateRegion() -
whatCursorPosition
protected boolean whatCursorPosition() -
editAndExecute
protected boolean editAndExecute() -
builtinWidgets
-
redisplay
public boolean redisplay() -
redisplay
protected void redisplay(boolean flush) -
getDisplayedBufferWithPrompts
Compute the full string to be displayed with the left, right and secondary prompts- Parameters:
secondaryPrompts
- a list to store the secondary prompts- Returns:
- the displayed string including the buffer, left prompts and the help below
-
insertTab
protected boolean insertTab() -
expandHistory
protected boolean expandHistory() -
expandWord
protected boolean expandWord() -
expandOrComplete
protected boolean expandOrComplete() -
expandOrCompletePrefix
protected boolean expandOrCompletePrefix() -
completeWord
protected boolean completeWord() -
completePrefix
protected boolean completePrefix() -
listChoices
protected boolean listChoices() -
deleteCharOrList
protected boolean deleteCharOrList() -
doComplete
-
doComplete
protected boolean doComplete(LineReaderImpl.CompletionType lst, boolean useMenu, boolean prefix, boolean forSuggestion) -
wrap
-
getCandidateComparator
-
getOthersGroupName
-
getOriginalGroupName
-
getGroupComparator
-
nextBindingIsComplete
protected boolean nextBindingIsComplete() -
doMenu
protected boolean doMenu(List<Candidate> original, String completed, BiFunction<CharSequence, Boolean, CharSequence> escaper) -
clearChoices
protected boolean clearChoices() -
doList
protected boolean doList(List<Candidate> possible, String completed, boolean runLoop, BiFunction<CharSequence, Boolean, CharSequence> escaper) -
doList
protected boolean doList(List<Candidate> possible, String completed, boolean runLoop, BiFunction<CharSequence, Boolean, CharSequence> escaper, boolean forSuggestion) -
computePost
-
computePost
-
toColumns
-
toColumns
protected void toColumns(Object items, int width, int maxWidth, AttributedStringBuilder sb, Candidate selection, String completed, boolean rowsFirst, boolean doMenuList, int[] out) -
getCompletionStyleStarting
-
getCompletionStyleDescription
-
getCompletionStyleGroup
-
getCompletionStyleSelection
-
getCompletionStyleBackground
-
getCompletionStyleStarting
-
getCompletionStyleDescription
-
getCompletionStyleGroup
-
getCompletionStyleSelection
-
getCompletionStyleBackground
-
getCompletionStyleListStarting
-
getCompletionStyleListDescription
-
getCompletionStyleListGroup
-
getCompletionStyleListSelection
-
getCompletionStyleListBackground
-
getCompletionStyle
-
buildStyle
-
moveHistory
protected boolean moveHistory(boolean next, int count) Used in "vi" mode for argumented history move, to move a specific number of history entries forward or back.- Parameters:
next
- If true, move forwardcount
- The number of entries to move- Returns:
- true if the move was successful
-
moveHistory
protected boolean moveHistory(boolean next) Move up or down the history tree.- Parameters:
next
-true
to go to the next,false
for the previous.- Returns:
true
if successful,false
otherwise
-
killBuffer
protected boolean killBuffer() -
killWholeLine
protected boolean killWholeLine() -
killLine
public boolean killLine()Kill the buffer ahead of the current cursor position.- Returns:
- true if successful
-
backwardKillLine
public boolean backwardKillLine() -
killRegion
public boolean killRegion() -
copyRegionAsKill
public boolean copyRegionAsKill() -
yank
public boolean yank() -
yankPop
public boolean yankPop() -
mouse
public boolean mouse() -
beginPaste
public boolean beginPaste() -
focusIn
public boolean focusIn() -
focusOut
public boolean focusOut() -
clear
public boolean clear()Clean the used display- Returns:
true
-
clearScreen
public boolean clearScreen()Clear the screen by issuing the ANSI "clear screen" code.- Returns:
true
-
beep
public boolean beep()Issue an audible keyboard bell.- Returns:
true
-
isDelimiter
protected boolean isDelimiter(int c) Checks to see if the specified character is a delimiter. We consider a character a delimiter if it is anything but a letter or digit.- Parameters:
c
- The character to test- Returns:
- True if it is a delimiter
-
isWhitespace
protected boolean isWhitespace(int c) Checks to see if a character is a whitespace character. Currently this delegates toCharacter.isWhitespace(char)
, however eventually it should be hooked up so that the definition of whitespace can be configured, as readline does.- Parameters:
c
- The character to check- Returns:
- true if the character is a whitespace
-
isViAlphaNum
protected boolean isViAlphaNum(int c) -
isAlpha
protected boolean isAlpha(int c) -
isWord
protected boolean isWord(int c) -
defaultKeyMaps
- Specified by:
defaultKeyMaps
in interfaceLineReader
-
emacs
-
viInsertion
-
viCmd
-
safe
-
dumb
-
visual
-
viOpp
-
zeroOut
public void zeroOut()Description copied from interface:LineReader
Clear any internal buffers.- Specified by:
zeroOut
in interfaceLineReader
-
DEFAULT_TAB_WIDTH
andgetTabWidth()