Guest User

Less config

a guest
Jul 21st, 2025
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.12 KB | Software | 0 0
  1. #
  2. # less
  3. #
  4. # -F or --quit-if-one-screen
  5. #       Causes less to automatically exit if the entire file can be displayed on the first screen.
  6. #
  7. # -i or --ignore-case
  8. #   Causes searches to ignore case; that is, uppercase and lowercase are
  9. #   considered identical.  This option is ignored if any uppercase letters
  10. #   appear in the search pattern; in other words, if a pattern contains
  11. #   uppercase letters, then that search does not ignore case.
  12. #
  13. # -S or --chop-long-lines
  14. #   Causes lines longer than the screen width to be chopped (truncated) rather
  15. #   than wrapped.  That is, the portion of a long line that does not fit in the
  16. #   screen width is not shown.  The default is to wrap long lines; that is,
  17. #   display the remainder on the next line.
  18. #
  19. # -R or --RAW-CONTROL-CHARS
  20. #   Like -r, but only ANSI "color" escape sequences are output in "raw" form.
  21. #   Unlike -r, the screen appearance is  maintained correctly in most cases.
  22. #   ANSI "color" escape sequences are sequences of the form:
  23. #
  24. #       ESC [ ... m
  25. #
  26. #   where the "..." is zero or more color specification characters For the
  27. #   purpose of keeping track of screen appearance, ANSI color escape sequences
  28. #   are assumed to not move the cursor.  You can make less think that characters
  29. #   other than "m" can end ANSI color escape sequences by setting the
  30. #   environment variable LESSANSIENDCHARS to the list of characters which can
  31. #   end a color escape sequence.  And you can make less think that characters
  32. #   other than the standard ones may appear between the ESC and the m by setting
  33. #   the environment variable LESSANSIMIDCHARS to the list of characters which
  34. #   can appear.
  35. #
  36. # -X or --no-init
  37. #       Disables sending the termcap initialization and deinitialization strings
  38. #       to the terminal.  This is sometimes desirable  if the deinitialization
  39. #       string does something unnecessary, like clearing the screen.
  40. #
  41. # -xn,... or --tabs=n,...
  42. #   Sets tab stops.  If only one n is specified, tab stops are set at multiples
  43. #   of n.  If multiple values separated by commas are specified, tab stops are
  44. #   set at those positions, and then continue with the same spacing as the last
  45. #   two.  For example, -x9,17 will set tabs at positions 9, 17, 25, 33, etc.
  46. #   The default for n is 8.
  47. #
  48. # -# or --shift
  49. #   Specifies the default number of positions to scroll horizontally in the
  50. #   RIGHTARROW and LEFTARROW commands.  If the number specified is zero, it sets
  51. #   the default number of positions to one half of the screen width.
  52. #   Alternately, the number may be specified as a fraction of the width of the
  53. #   screen, starting with a decimal point: .5 is half of the screen width, .3 is
  54. #   three tenths of the screen width, and so on.  If the number is specified as
  55. #   a fraction, the actual number of scroll positions is recalculated if the
  56. #   terminal window is resized, so that the actual scroll remains at the
  57. #   specified fraction of the screen width.
  58. #
  59.  
  60. # Notes:
  61. #
  62. # We use the --raw-control-chars option because `git diff` breaks otherwise.
  63.  
  64. export LESS='--quit-if-one-screen --ignore-case --chop-long-lines --RAW-CONTROL-CHARS --no-init --tabs=4 --shift=4'
  65.  
Advertisement
Add Comment
Please, Sign In to add comment