dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
21.93k stars 1.76k forks source link

progress bars for disk and memory usage are broken #2226

Open db48x opened 1 year ago

db48x commented 1 year ago

Description

The first part of the bar is printed, followed by zero or more blank lines, followed by the string “istrom”, the rest of the bar and the rest of the info.

Neofetch version

Neofetch 7.1.0

Screenshot

Screenshot from 2022-10-31 03-02-27

Config file

Omitted; it’s nothing unusual.

Verbose log

I’ll save you the effort. Here’s the relevant bit:

+ case ${bar_color_total}${1} in
++ color distro
++ case $1 in
++ printf '\e[38;5;%bm' distro
+ bar_color_total='\033[38;5;distrom'

You can see that it is substituting the string “distro” into the escape sequence for the color. It was supposed to pick a number, but failed. It turns out that the new Fedora logo uses color 12, which is two digits. The patterns in set_text_colors only match single–digit numbers, so presumably the same bug will happen on a fair number of distros.