apt colored output (was Re: Buster => Bullseye: packages kept back)
- To: debian-user@lists.debian.org
- Subject: apt colored output (was Re: Buster => Bullseye: packages kept back)
- From: davidson <davidson@freevolt.org>
- Date: Mon, 3 Apr 2023 05:55:26 +0000 (UTC)
- Message-id: <[🔎] alpine.DEB.2.21.2304030555170.28350@azone.org>
- In-reply-to: <alpine.DEB.2.21.2303280628170.25037@azone.org>
- References: <9c56f0c3-0fec-2dc0-1681-fc57148455db@dybdal.dk> <CAH8yC8mZ_cqfccX1t5HsNOWFbenu2emc8T_YCT3MVEgfvg3QqA@mail.gmail.com> <0c4fcb7d-7f0d-b135-3b4d-6ff782fd843e@dybdal.dk> <20230327112032.GA2347@cventin.lip.ens-lyon.fr> <ZCGCuTzR2+MdtSjg@wooledge.org> <20230327125210.pgscdj5h4sw73okg@randomstring.org> <ZCGirwVqEA2EqBBB@wooledge.org> <alpine.DEB.2.21.2303280628170.25037@azone.org>
On Tue, 28 Mar 2023 davidson wrote:
Replying to myself.
According to [console_codes(4), under section ECMA-48 Set Graphics
Rendition], [this value] sets "blink off"
# apt -o "APT::Color::Highlight=^[[25m" search nethack
For me, this produces text in the default style (no highlights, no
colors).
This surprised me.
But it should not have, since the config option specified above just
tells apt to prefix the package name with a different PRETTIFY escape
sequence in output like
<PRETTIFY>slashem-x11<RESET ATTRIBS>/stable 0.0.7E7F3-10 amd64
variant of Nethack (X11 window port)
One that happens to set the blink display attribute off. Vacuously, of
course, unless you happen to have "blink on" set.
Might as well replace 25 ("blink off") with any of
22 set normal intensity
24 underline off
25 blink off
27 reverse video off
or just
0 reset all attributes to their defaults
or nothing at all, ie
APT::Color::Highlight=^[[m
which is equivalent to
APT::Color::Highlight=^[[0m # reset all attributes to their defaults
This solves the problem of undesired colors, but not the emission of
unwanted escape sequences. And so there are bug reports like this:
#1010806 - apt: Avoid color output on monochrome terminals
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010806
--
"What is your pronoun?" he inquired. "I have no pronoun," I answered,
hoping I knew his meaning. "What is your cog?" "My cog?" "Your sur
noun." "I haven't got that either."
-- Flann O'Brien, _The Third Policeman_
Reply to: