set LESS environment variable to: -SXIFRs in your .bash_profile or .bashrc:
-S: chop lines, side scroll with left/right arrow keys-X: leave contents on screen when less exits-I: ignore case when searching with/or?-F: quit immediately when the entire file fits in one screen-R: enable colored output-s: squeeze blank lines into a single blank line
useful:
-N: line numbers-F: force open non-regular files-R: Causesrawcontrol characters to be displayed, but only ANSI "color" escape sequences-p: equivalent to specifying +/pattern;-
- that is, it tells less to start at the first occurrence of pattern in the file
--incsearch: incremental search--mouse --wheel-lines=10: let the mouse wheel scroll10lines at a time- To start at a specific line number, say line 150, use
less +150 filename
note: these options are compatible with bat