Package org.jline.builtins
Class Less
java.lang.Object
org.jline.builtins.Less
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
private class
protected static enum
(package private) static class
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BindingReader
protected final StringBuilder
boolean
protected final Path
protected final Display
protected String
protected String
private static final int
protected int
protected int
protected int
protected int
private boolean
private String
boolean
boolean
protected KeyMap<Less.Operation>
protected List<AttributedString>
protected String
private static final String
private boolean
protected int
boolean
boolean
protected int
protected final Map<String,
Less.Operation> protected String
protected Nano.PatternHistory
boolean
boolean
boolean
boolean
boolean
protected BufferedReader
protected final Size
protected int
(package private) SyntaxHighlighter
protected String
protected final Terminal
boolean
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addFile()
private void
private void
bindKeys
(KeyMap<Less.Operation> map) private void
bof()
static void
This is for long running commands to be interrupted by ctrl-c(package private) boolean
display
(boolean oneScreen) (package private) boolean
private void
private void
eof()
(package private) AttributedString
getLine
(int line) private Pattern
private Pattern
getPattern
(boolean doDisplayPattern) (package private) int
getStrictPositiveNumberInBuffer
(int def) void
handle
(Terminal.Signal signal) private void
help()
(package private) void
moveBackward
(int lines) (package private) void
moveForward
(int lines) (package private) void
moveTo
(int lineNum) private void
moveToMatch
(boolean forward, boolean spanFiles) private void
private void
moveToNextMatch
(boolean spanFiles) private void
private void
moveToPreviousMatch
(boolean spanFiles) private Less.Pair<Integer,
AttributedString> nextLine2display
(int line, Pattern dpCompiled) protected void
private void
parseConfig
(Path file) private Less.Pair<Integer,
AttributedString> prevLine2display
(int line, Pattern dpCompiled) private String
void
void
private boolean
search()
private boolean
toBeDisplayed
(AttributedString curLine, Pattern dpCompiled) static String[]
usage()
-
Field Details
-
ESCAPE
private static final int ESCAPE- See Also:
-
MESSAGE_FILE_INFO
- See Also:
-
quitAtSecondEof
public boolean quitAtSecondEof -
quitAtFirstEof
public boolean quitAtFirstEof -
quitIfOneScreen
public boolean quitIfOneScreen -
printLineNumbers
public boolean printLineNumbers -
quiet
public boolean quiet -
veryQuiet
public boolean veryQuiet -
chopLongLines
public boolean chopLongLines -
ignoreCaseCond
public boolean ignoreCaseCond -
ignoreCaseAlways
public boolean ignoreCaseAlways -
noKeypad
public boolean noKeypad -
noInit
public boolean noInit -
tabs
-
syntaxName
-
historyLog
-
terminal
-
display
-
bindingReader
-
currentDir
-
sources
-
sourceIdx
protected int sourceIdx -
reader
-
keys
-
firstLineInMemory
protected int firstLineInMemory -
lines
-
firstLineToDisplay
protected int firstLineToDisplay -
firstColumnToDisplay
protected int firstColumnToDisplay -
offsetInLine
protected int offsetInLine -
message
-
errorMessage
-
buffer
-
options
-
window
protected int window -
halfWindow
protected int halfWindow -
nbEof
protected int nbEof -
patternHistory
-
pattern
-
displayPattern
-
size
-
syntaxHighlighter
SyntaxHighlighter syntaxHighlighter -
syntaxFiles
-
highlight
private boolean highlight -
nanorcIgnoreErrors
private boolean nanorcIgnoreErrors
-
-
Constructor Details
-
Less
-
Less
-
Less
-
-
Method Details
-
usage
-
parseConfig
- Throws:
IOException
-
doTabs
-
tabs
-
handle
-
run
- Throws:
IOException
InterruptedException
-
run
- Throws:
IOException
InterruptedException
-
moveToMatch
- Throws:
IOException
-
addSource
- Throws:
IOException
-
addFile
- Throws:
IOException
InterruptedException
-
search
- Throws:
IOException
InterruptedException
-
help
- Throws:
IOException
-
openSource
- Throws:
IOException
-
moveTo
- Throws:
IOException
-
moveToNextMatch
- Throws:
IOException
-
moveToNextMatch
- Throws:
IOException
-
moveToPreviousMatch
- Throws:
IOException
-
moveToPreviousMatch
- Throws:
IOException
-
printable
-
moveForward
- Throws:
IOException
-
moveBackward
- Throws:
IOException
-
eof
private void eof() -
bof
private void bof() -
getStrictPositiveNumberInBuffer
int getStrictPositiveNumberInBuffer(int def) -
nextLine2display
private Less.Pair<Integer,AttributedString> nextLine2display(int line, Pattern dpCompiled) throws IOException - Throws:
IOException
-
prevLine2display
private Less.Pair<Integer,AttributedString> prevLine2display(int line, Pattern dpCompiled) throws IOException - Throws:
IOException
-
toBeDisplayed
-
display
- Throws:
IOException
-
display
- Throws:
IOException
-
getPattern
-
getPattern
-
getLine
- Throws:
IOException
-
checkInterrupted
This is for long running commands to be interrupted by ctrl-c- Throws:
InterruptedException
- if the thread has been interruped
-
bindKeys
-