Bug 510577 - Build output of the Build & Run plugin does not display terminal colours
Summary: Build output of the Build & Run plugin does not display terminal colours
Status: CONFIRMED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.08.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-13 19:15 UTC by Jack Hill
Modified: 2025-10-14 08:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Hill 2025-10-13 19:15:27 UTC
SUMMARY
The output tab of the Build & Run plugin does not seem to correctly print terminal colours like \033[95m. If this is not possible in QTextBrowser then at the very least these tags should be stripped before printing the output.

I noticed this problem when running a Bazel build, because Bazel makes good use of terminal colours.

STEPS TO REPRODUCE
1. Set the following line as the build command:
echo "\033[95mFinished building\033[0m"
2. "Build" the target
3. Go to the build output tab

OBSERVED RESULT
\033[95mFinished building\033[0m

in black text

EXPECTED RESULT
Finished building

preferably in the correct colour, but at the very least the colour tags should be stripped.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20251007
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Kernel Version: 6.17.0-2-default (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 Kåre Särs 2025-10-14 08:58:02 UTC
Thanks for the report!

Hmm...
We use basic html for coloring info/warning/error/... and links, so setting a text color should not be impossible. Using the colors from the terminal could clash a bit with the mentioned stuff.

Removing the color tags should be quite easy...