Package org.jline.builtins
Class Less
java.lang.Object
org.jline.builtins.Less
A terminal pager similar to the 'less' Unix command.
This class provides a file viewer with features including:
- Forward and backward navigation
- Search functionality
- Syntax highlighting
- Line numbering
- Status display
- Multiple file support
The implementation supports many of the key bindings and features of the traditional Unix 'less' command, adapted for JLine's terminal handling.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BindingReaderprotected final StringBuilderbooleanprotected final Pathprotected final org.jline.utils.Displayprotected Stringprotected Stringprotected intprotected intprotected intprotected intbooleanbooleanprotected KeyMap<Less.Operation> protected List<org.jline.utils.AttributedString> protected Stringprotected intbooleanbooleanprotected intprotected final Map<String, Less.Operation> protected Stringprotected Nano.PatternHistorybooleanbooleanbooleanbooleanbooleanprotected BufferedReaderprotected final org.jline.terminal.Sizeprotected intprotected Stringprotected final org.jline.terminal.Terminalbooleanprotected int -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
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
-
terminal
protected final org.jline.terminal.Terminal terminal -
display
protected final org.jline.utils.Display 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
protected final org.jline.terminal.Size size
-
-
Constructor Details
-
Less
-
Less
-
Less
public Less(org.jline.terminal.Terminal terminal, Path currentDir, Options opts, ConfigurationPath configPath)
-
-
Method Details
-
usage
-
tabs
-
handle
public void handle(org.jline.terminal.Terminal.Signal signal) -
run
- Throws:
IOExceptionInterruptedException
-
run
- Throws:
IOExceptionInterruptedException
-
openSource
- Throws:
IOException
-
checkInterrupted
This is for long running commands to be interrupted by ctrl-c- Throws:
InterruptedException- if the thread has been interruped
-