Public bug reported:

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.

** Affects: apt (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, 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


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to