chroma icon indicating copy to clipboard operation
chroma copied to clipboard

Please add -v flag

Open plasmoduck opened this issue 3 years ago • 1 comments

In standard cat, 'cat -v' displays non-printing charactors so they are visible. From the cat manpage:

-v Display non-printing characters so they are visible. Control characters print as ‘^X’ for control-X; the delete character (octal 0177) prints as ‘^?’. Non-ASCII characters (with the high bit set) are printed as ‘M-’ (for meta) followed by the character for the low 7 bits.

Using ust normal 'cat' can be dangerous for some files as those escape codes can be interpreted and ran. In chroma 'cat -v' shows chroma: error: unknown flag -v, did you mean one of "-l", "-s", "-f"?

Would be nice if you add the -v flag to chroma to support this displaying non-printing characters so they are visible.

plasmoduck avatar Sep 10 '21 01:09 plasmoduck

Seems reasonable. I think an option for the terminal formatter would be fine. Contributions are welcome.

alecthomas avatar Sep 10 '21 02:09 alecthomas