On Sat, 03 May 2025 10:21:35 +0200 Antoine Le Gonidec wrote
current behaviour: LESS=FRSXMK apt show mono-devel/trixie
expected behaviour: LESS=FRXMK apt show mono-devel/trixie
I was confused by the commit message and the related issue title as well.
On Sat, 03 May 2025 10:49:11 +0200 Julian Andres Klode wrote:
This is already being discussed in
<https://salsa.debian.org/apt-team/apt/-/merge_requests/470#note_609281>
In systemd "S" was added in the initial commit
<https://github.com/systemd/systemd/commit/0736af98c6>
2011-01-02 00:25:57 +0100 Miklos Vajna
systemctl: implement auto-pager a la git
and unlike later added options like "K" the reason is not justified,
see <https://manpages.debian.org/journalctl.1#:~:text=$SYSTEMD_LESS>.
I have not noticed a bugzilla issue for adding pager, just a request
to suppress "S"
<https://bugs.freedesktop.org/show_bug.cgi?id=35725>
For APT, besides hidden dependencies in "apt show PACKAGE", I see a
couple of related issues:
- APT pager is not described in the docs, launchpad issues are more
informative.
- It can not be adjusted through APT configuration files. Environment
set through /etc/profile.d/ may be unavailable in terminal
applications spawned directly from systemd user session
by GUI launchers.
Despite both systemd and apt implementations were inspired by git (that,
by the way, does have "S" by default), details are rather different, so
docs, what environment variables are respected, are important.
I like that apt allows to override specific options without specifying
all defaults one. On the other hand LESS environment variable caused
issues for some users: debian-user, Re: apt show escape characters,
Fri, 7 Nov 2025 21:59:21 -0600
<https://lists.debian.org/msgid-search/?m=aq7agftnpf%[email protected]>
For those who, like me, frequently uses "-" "S" in journalctl and finds
annoying trimmed log lines in "systemctl status UNIT", the workaround
for APT (I find convenient ignore case search in man)
APT_PAGER="less -i -+S --wordwrap"
export APT_PAGER
(In general case one may wish to test if less(1) is installed.)
For details see
<https://manpages.debian.org/git-config.1#:~:text=core.pager>