sedwards2009 / extraterm

The swiss army chainsaw of terminal emulators
https://extraterm.org
MIT License
2.54k stars 115 forks source link

Support printing control characters #276

Open cebaa opened 4 years ago

cebaa commented 4 years ago

Under cygwin:

$ awk 'BEGIN{for(i=1;i<32;i++)printf "%c",i; print}'

$

Or:

$ echo -e a\\001b
ab
$

It would be good to have an option to print them.

sedwards2009 commented 4 years ago

Many control characters actually do something and are processed by the emulator. There are a couple which are not, and I guess they could be replaced with some kind of glyph.

I'm not sure if I see the use case here though.

cebaa commented 4 years ago

Many control characters actually do something and are processed by the emulator.

Right, I'm specifically talking about the ones that are not. I understand for example \n would need to be interpreted as a new line.

I'm not sure if I see the use case here though.

When displaying binary files, it's not the same if you see a^Ab and ab. I agree it's likely not widely used, however still I see no reason not to display a control character that should / can be displayed.

ashb commented 3 years ago

On konsole:

❯ awk 'BEGIN{for(i=1;i<32;i++)printf "%c",i; print}'

▒▒

on Tilix:

❯ awk 'BEGIN{for(i=1;i<32;i++)printf "%c",i; print}'

�

So this is not really a unique behaviuor in extraterm. If you want to see binary characters in a useful way, try less or xxd.