Class Less


  • public class Less
    extends java.lang.Object
    • Field Detail

      • 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

        protected java.util.List<java.lang.Integer> tabs
      • syntaxName

        protected java.lang.String 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

        protected final java.nio.file.Path currentDir
      • sources

        protected java.util.List<Source> sources
      • sourceIdx

        protected int sourceIdx
      • reader

        protected java.io.BufferedReader reader
      • firstLineInMemory

        protected int firstLineInMemory
      • lines

        protected java.util.List<org.jline.utils.AttributedString> lines
      • firstLineToDisplay

        protected int firstLineToDisplay
      • firstColumnToDisplay

        protected int firstColumnToDisplay
      • offsetInLine

        protected int offsetInLine
      • message

        protected java.lang.String message
      • errorMessage

        protected java.lang.String errorMessage
      • buffer

        protected final java.lang.StringBuilder buffer
      • options

        protected final java.util.Map<java.lang.String,​Less.Operation> options
      • window

        protected int window
      • halfWindow

        protected int halfWindow
      • nbEof

        protected int nbEof
      • pattern

        protected java.lang.String pattern
      • displayPattern

        protected java.lang.String displayPattern
      • size

        protected final org.jline.terminal.Size size
    • Constructor Detail

      • Less

        public Less​(org.jline.terminal.Terminal terminal,
                    java.nio.file.Path currentDir)
      • Less

        public Less​(org.jline.terminal.Terminal terminal,
                    java.nio.file.Path currentDir,
                    Options opts)
      • Less

        public Less​(org.jline.terminal.Terminal terminal,
                    java.nio.file.Path currentDir,
                    Options opts,
                    ConfigurationPath configPath)
    • Method Detail

      • usage

        public static java.lang.String[] usage()
      • tabs

        public Less tabs​(java.util.List<java.lang.Integer> tabs)
      • handle

        public void handle​(org.jline.terminal.Terminal.Signal signal)
      • run

        public void run​(Source... sources)
                 throws java.io.IOException,
                        java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • run

        public void run​(java.util.List<Source> sources)
                 throws java.io.IOException,
                        java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • openSource

        protected void openSource()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • checkInterrupted

        public static void checkInterrupted()
                                     throws java.lang.InterruptedException
        This is for long running commands to be interrupted by ctrl-c
        Throws:
        java.lang.InterruptedException - if the thread has been interruped