[Bug 2103921] Re: APT doesn't respect pager's configuration with apt show

Julian Andres Klode 2103921 at bugs.launchpad.net
Thu Jun 5 16:28:09 UTC 2025


This is all expected.

PAGER (or the more specific APT_PAGER) behaves as follows:

- If the variable is unset, the default pager is used (/usr/bin/pager)
- If the variable is set to "cat" or nothing, no pager is used.
- For other values, that value is used as the pager

So with PAGER unset, you got the default pager. When you ran `PAGER= apt
show package`, you set PAGER to the empty string, and hence paging got
disabled.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/2103921

Title:
  APT doesn't respect pager's configuration with apt show

Status in apt package in Ubuntu:
  Fix Released

Bug description:
  I'm using less as my pager. PAGER env variable, `pager` and `sensible-pager` commands also points to less.
  When I execute `apt show <package>`, the pager is invoked by apt, it's less (I can go up, different than more), but it doesn't use the configuration I had set with the LESS env variable, so things like scrolling with the mouse wheel are not possible.
  If I execute `apt changelog <package>`, it did work since the command downloads the changelog file in /tmp and opens it with the pager.
  `apt show <package>|less` also works.
  I found a $PAGER_ENV set in the file CMakeLists.txt in the apt's source, and it sets some options for LESS env variable. I don't know if these values are being used just during the compilation for the tests, or the value is kept forever, which maybe isn't correct since it should respect the configurations defined by the user in LESS env variable.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2103921/+subscriptions




More information about the foundations-bugs mailing list