less: Add --quit-if-one-screen

Before v530 `less` would need the -X flag as well for -F to be useful.
With v530 it does not enter alternate mode if the content fits in one
screen.
This commit is contained in:
2022-05-14 14:42:07 +02:00
parent 58daf17e79
commit d5350276dc

View File

@@ -77,6 +77,11 @@ export LESS_TERMCAP_us=$'\e[1;4;31m'
LESS+="${LESS:+ }--mouse --wheel-lines=3"
# Display ANSI color escape sequences
LESS+="${LESS:+ }-R"
# Exit if entire file fits on screen
# NOTE: Before v530 `less` would need the -X flag as well for -F to be useful.
# With v530 it does not enter alternate mode if the content fits in one
# screen.
LESS+="${LESS:+ }-F"
export LESS
# Show also hidden files per default but ignore files in '.git' directories.