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

Re: apt show escape characters



On 2025-11-08 09:53:44 -0500, Greg Wooledge wrote:
> On Fri, Nov 07, 2025 at 21:38:17 +0000, Tim Woodall wrote:
> > On Fri, 7 Nov 2025, Greg Wooledge wrote:
> > > 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.
> > > 
> > > 
> > Or maybe add -R?
> > 
> > I have it set to -RX.
> 
> That may be acceptable for many users.  I don't want that as a default,
> though.  There are far too many times when I use less on a file/stream
> that may or may not contain binary data, and in those cases I *want*
> the binary data to be presented as reverse-video ESC and so on, rather
> than potentially destroying my terminal.

-R should not destroy your terminal. This is not -r.

I also use "less" often on binary data, and I haven't seen any issue
with -R (I use LESS="-ciMR -j3" by default).

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)


Reply to: