Package org.jline.builtins
Class Less
java.lang.Object
org.jline.builtins.Less
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classprivate classprotected static enum(package private) static classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BindingReaderprotected final StringBuilderbooleanprotected final Pathprotected final Displayprotected Stringprotected Stringprivate static final intprotected intprotected intprotected intprotected intprivate booleanprivate Stringbooleanbooleanprotected KeyMap<Less.Operation> protected List<AttributedString> protected Stringprivate static final Stringprivate booleanprotected intbooleanbooleanprotected intprotected final Map<String, Less.Operation> protected Stringprotected Nano.PatternHistorybooleanbooleanbooleanbooleanbooleanprotected BufferedReaderprotected final Sizeprotected int(package private) SyntaxHighlighterprotected Stringprotected final Terminalbooleanprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddFile()private voidprivate voidbindKeys(KeyMap<Less.Operation> map) private voidbof()static voidThis is for long running commands to be interrupted by ctrl-c(package private) booleandisplay(boolean oneScreen) (package private) booleanprivate voidprivate voideof()(package private) AttributedStringgetLine(int line) private Patternprivate PatterngetPattern(boolean doDisplayPattern) (package private) intgetStrictPositiveNumberInBuffer(int def) voidhandle(Terminal.Signal signal) private voidhelp()(package private) voidmoveBackward(int lines) (package private) voidmoveForward(int lines) (package private) voidmoveTo(int lineNum) private voidmoveToMatch(boolean forward, boolean spanFiles) private voidprivate voidmoveToNextMatch(boolean spanFiles) private voidprivate voidmoveToPreviousMatch(boolean spanFiles) private Less.Pair<Integer, AttributedString> nextLine2display(int line, Pattern dpCompiled) protected voidprivate voidparseConfig(Path file) private Less.Pair<Integer, AttributedString> prevLine2display(int line, Pattern dpCompiled) private Stringvoidvoidprivate booleansearch()private booleantoBeDisplayed(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:
IOExceptionInterruptedException
-
run
- Throws:
IOExceptionInterruptedException
-
moveToMatch
- Throws:
IOException
-
addSource
- Throws:
IOException
-
addFile
- Throws:
IOExceptionInterruptedException
-
search
- Throws:
IOExceptionInterruptedException
-
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
-