]> git.ipfire.org Git - thirdparty/util-linux.git/commit
more: align MORE_SHELL_LINES semantics with less(1)
authorKarel Zak <kzak@redhat.com>
Wed, 6 May 2026 09:58:50 +0000 (11:58 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 6 May 2026 09:58:50 +0000 (11:58 +0200)
commit390c79cb2695f0e75cc6efbc56261fad1e37d149
tree1ec05d72b9f076b6ef6256239e81e9ea335a74eb
parenta35a40420b7a13fce73b36c9b57a039ab9490ebe
more: align MORE_SHELL_LINES semantics with less(1)

Change MORE_SHELL_LINES to subtract lines from lines_per_screen
(like LESS_SHELL_LINES in less(1)) rather than setting the absolute
number of lines per screenful.

The block is moved after lines_per_screen is finalized (either from
the default lines_per_page - 1 or from an explicit -n/--lines), so
it correctly adjusts both cases. Values that are zero or would exceed
lines_per_screen are silently ignored.

Addresses: https://github.com/util-linux/util-linux/issues/3476
Co-authored-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/more.1.adoc
text-utils/more.c