[Bug 2020812] Re: Unable to change color highlight in apt output
Julian Andres Klode
2020812 at bugs.launchpad.net
Fri May 26 05:27:05 UTC 2023
I think you need to url encode the sequence, but not sure. I don't think
there's anything we can do here about handling backslashes, the problem
is backspaces do happen in actual config items and we can't introduce a
behavior change for them as that would cause regressions.
You should be free to also printf the actual special character into the
config option or the command line argument.
--
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/2020812
Title:
Unable to change color highlight in apt output
Status in apt package in Ubuntu:
New
Bug description:
Ubuntu Release:
lsb_release -rd
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Source package and version:
dpkg-query -W apt
apt 2.4.9
Binary apt command has support for color output on some commands such
as "apt list <packagename>" Where enabled the default color output is
unbolded green color. This is due to the apt configuration item,
APT::Color::Highlight being set to the default ANSI color code of
"\x1B[32m", Setting it to another ANSI code should alter the apt
output.
Expectation:Setting the Highlight configuration option to another ANSI
code should alter the apt output to the specified color code.
$ apt list apt -o apt::color::highlight="\x1b[31m" should set the
highlighted package name to an unbold red color.
What happens:
$ apt list apt -o apt::color::highlight="\x1b[31m"
Listing... Done
\x1b[31mapt/jammy-updates,now 2.4.9 amd64 [installed,automatic]
\x1b[31mapt/jammy-updates 2.4.9 i386
Prepends literal string of \x1b[31m instead of producing colored
output.
"\033[31m" doesn't work either.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2020812/+subscriptions
More information about the foundations-bugs
mailing list