Honestly, can't tell if this is a bug or ed just 'works as designed'. Either way, the test case is appropriate given the significance of today's date :-).
# Summary: Editing text containing terminal escape codes with `ed` could lead to having said codes interpreted by the terminal - making `ed` unusable (requiring something unwieldy like `vi` or `emacs` to solve the problem). The outcome is similar to using `cat` on a binary file. # How to reproduce: 1. Download ` https://raw.githubusercontent.com/minimaxir/big-list-of-naughty-strings/master/blns.txt` (escape codes could be stripped by mail clients, etc. so it's best to download this test case). 2. Edit the file with `ed`, and print (1,$n or 1,$p or whatever the line number is, etc.) out the following line: ``` Roses are [0;31mred[0m, violets are [0;34mblue. Hope you enjoy terminal hue ``` Outcome: your terminal is now blue :-). Expected result: the line is printed as plain text. Cheers!
_______________________________________________ bug-ed mailing list bug-ed@gnu.org https://lists.gnu.org/mailman/listinfo/bug-ed