[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt show escape characters



On Fri 07 Nov 2025 at 10:10:57 (-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 don't understand. When did less get involved in a simple command
like   apt show bash   ?

The only way I know in trixie for displaying the appearance as
intended is:

  PAGER= apt show bash

Who sets PAGER, I don't know. It's not shown in my environment.

I've been using   MANOPT='-P less'   for years, which gives me paging,
but also the bold and underlining that helps distinguish words having
a particular meaning from the rest of the text. This is now screwed
in trixie, in the same way as the OP's problem:

  man less                     unreadable
  MANOPT= man less             unreadable
  MANOPT= man less | less -r   readable, but bold/underlining gone
  MANOPT= man less | less -R   readable, but bold/underlining gone
  PAGER= MANOPT= man less      ½ readable, with bold/underlining

By ½, I mean that you can read just the final part of any long
document, depending on the size of your scrollback buffer (and
forget that on a real Linux Console). Perhaps some earlier bits
with speedy use of ^S/^Q.

Cheers,
David.


Reply to: