Right now commands outputting binary which cannot be rendered as test (ex: txt2img) can render the terminal unusable as reported here.
Most shells will have this same issue because byte streams are always rendered when they're not redirected. However, we can do a bit better since commands have models. For any command with a corresponding model, we can specify the output format. For any command that reports to output in binary format, if it's directly output to stdout we can render it as hex values instead.
Open to suggestions/ideas on this, especially about potential problems with the approach described above.
Right now commands outputting binary which cannot be rendered as test (ex: txt2img) can render the terminal unusable as reported here.
Most shells will have this same issue because byte streams are always rendered when they're not redirected. However, we can do a bit better since commands have models. For any command with a corresponding model, we can specify the output format. For any command that reports to output in binary format, if it's directly output to stdout we can render it as hex values instead.
Open to suggestions/ideas on this, especially about potential problems with the approach described above.