sexpect icon indicating copy to clipboard operation
sexpect copied to clipboard

option to discard color codes & al

Open macmpi opened this issue 3 years ago • 2 comments

Some programs (like bluetoothctl) report messages with color codes that can't be disabled: that makes sexpect regex quite challenging to craft (expect seems immune to that). Would it make sense to have a mode/option to discard all of such formatting for regex/exact/glob matches? Thanks for consideration.

macmpi avatar Dec 01 '22 17:12 macmpi

It's also very challenging for sexpect. It's not easy to recognize these control sequences.

clarkwang avatar Dec 02 '22 01:12 clarkwang

maybe something like this could help? https://gitlab.com/saalen/ansifilter/

macmpi avatar Dec 02 '22 08:12 macmpi