Package: powermgmt-base Version: 1.37 Severity: normal Tags: patch The lspower tool outputs \e instead of properly sending the ESC symbol.
Compare: \e[0;1m✓ AC\e[0m \e[0;32;1m+ BAT0 (98%)\e[0m \e[0;1m✓ ucsi-source-psy-USBC000:001\e[0m \e[0;1;30m✗ ucsi-source-psy-USBC000:002\e[0m vs ✓ AC + BAT0 (98%) ✓ ucsi-source-psy-USBC000:001 ✗ ucsi-source-psy-USBC000:002 The patch is attached. -- With best wishes Dmitry -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.5.0-1-amd64 (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en Shell: /bin/sh linked to /usr/bin/bash Init: systemd (via /run/systemd/system) -- no debconf information
--- a/lspower 2023-11-10 01:14:04.094500300 +0200 +++ b/lspower 2023-11-10 01:14:09.022530391 +0200 @@ -50,7 +50,7 @@ C2="\e[0m" fi - echo "$C1$ICON $x${CAPACITY:+ ($CAPACITY%)}${HEALTH:+ $HEALTH}$C2" + echo -e "$C1$ICON $x${CAPACITY:+ ($CAPACITY%)}${HEALTH:+ $HEALTH}$C2" done if [ -z "$ICON" ];then echo "No powers supply sensors; that's normal on a desktop.";fi