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 org.jline.keymap.BindingReader
protected final StringBuilder
boolean
protected final Path
protected final org.jline.utils.Display
protected String
protected String
protected int
protected int
protected int
protected int
boolean
boolean
protected org.jline.keymap.KeyMap
<Less.Operation> protected List
<org.jline.utils.AttributedString> protected String
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 org.jline.terminal.Size
protected int
protected String
protected final org.jline.terminal.Terminal
boolean
protected 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
protected final org.jline.keymap.BindingReader 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:
IOException
InterruptedException
-
run
- Throws:
IOException
InterruptedException
-
openSource
- Throws:
IOException
-
checkInterrupted
This is for long running commands to be interrupted by ctrl-c- Throws:
InterruptedException
- if the thread has been interruped
-