qubes-issues icon indicating copy to clipboard operation
qubes-issues copied to clipboard

Option to filter-out entire ANSI escape sequences for `qrexec-client(-vm)` and/or `qvm-run`

Open alimirjamali opened this issue 4 months ago • 7 comments

How to file a helpful issue

The problem you're addressing (if any)

The current existing code of libqrexec-utils/do_replace_chars merely replaces escape characters with underline. This is problematic for the programs which do not have the option/configuration for avoiding ANSI escape sequences. Most specifically text coloring and graphic rendition sequences. Just filtering the escape character and not the entire sequence renders the output hard to read/parse.

One of the examples is DNF5 which will be the default in Fedora 41 (discussed here on forum)

The solution you'd like

Either improving the existing -t, -T, --filter-escape-chars* options to filter-out the entire known sequences instead of just replacing the escape character with underline. Or introducing new options for proper filtering.

The value to a user, and who that user might be

  • Users will not require to learn/specify plain-text output option for individual programs (if applicable) and could use a generic option for all.
  • Without this option, qubes-dom0-update output in R4.3 will be bad (the only existing alternative is to disable the progress bar).

Completion criteria checklist

(This section is for developer use only. Please do not modify it.)

alimirjamali avatar Sep 30 '24 01:09 alimirjamali