Re: apt show escape characters
Dear Mike:
you are a "victim" of this patch:
apt (2.9.35) unstable; urgency=medium
* Respect custom LESS/MORE/LV variables (LP: #2103921)
* solver3: Correctly deb822-escape error message in evaluation report
(LP: #2104276)
* pager: Also set SMK in LESS, fix LV=C to be LV=-c (LP: #2104280)
-- Julian Andres Klode <jak@debian.org> Thu, 27 Mar 2025 22:52:21 +0100
See also https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2103921 .
In order to avoid the issue, you may use
apt-cache show <package_name>
instead, if possible within your workflow.
Regards
Sebastian
________________________
Dipl.-Chem.
Sebastian Kraus
Email: sebastian.kraus@tu-berlin.de
________________________________________
From: Mike McClain <mike.junk.46@att.net>
Sent: Saturday, November 8, 2025 04:59
To: debian-user@lists.debian.org
Subject: Re: apt show escape characters
On Fri, Nov 07, 2025 at 10:10:57AM -0500, Greg Wooledge wrote:
> On Fri, Nov 07, 2025 at 08:37:31 -0600, Mike McClain wrote:
> > Since installing trixie apt show ... is displaying 'ESC[1m', 'ESC[0m'
> > and the like. What might be the difference in my bookworm install to
> > the new trixie install that would cause that?
>
> You've probably got the LESS variable set in your environment. I do
> too. I get that too.
>
> If I run
>
> (unset LESS; apt show bash)
>
> or
>
> env -u LESS apt show bash
>
> then the raw control characters are passed through directly to the
> terminal as intended.
I've had 'export LESS=-aCMsi' in the environment for several versions
of Debian. I currently have both bookworm and trixie installs both
with the same environment settings, atleast that I set.
The bookworm install doesn't show those escapes as text yet in trixie
'apt show ...' does.
Suggestions where I might look to see what's causing this and correct it?
Thanks,
Mike
--
Enjoy yourself. It is later than you think.
Reply to: