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:
@@ -77,6 +77,11 @@ export LESS_TERMCAP_us=$'\e[1;4;31m'
|
|||||||
LESS+="${LESS:+ }--mouse --wheel-lines=3"
|
LESS+="${LESS:+ }--mouse --wheel-lines=3"
|
||||||
# Display ANSI color escape sequences
|
# Display ANSI color escape sequences
|
||||||
LESS+="${LESS:+ }-R"
|
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
|
export LESS
|
||||||
|
|
||||||
# Show also hidden files per default but ignore files in '.git' directories.
|
# Show also hidden files per default but ignore files in '.git' directories.
|
||||||
|
|||||||
Reference in New Issue
Block a user