On Wed, 2022-12-07 at 11:13 -0800, Ray Andrews via Users wrote:
If I echo some colored text into a file and then look at it in Geany I see 'ESC' where the escape code is, but how can I recreate that manually? I've tried '\e[' and '\x1b[' and a few other things but nothing works.
What's supposed to "work"? Do you want to type out that exact symbol in geany's editor? I'm not aware of any way to type out this symbol in a non-terminal editor. And even though that should be possible in a terminal, I did not succeed.
You can copy-paste it though. FWIW, it's this: "" - you can't see it but it's there between the quotes (unless it got lost in transit).
You can recreate escape sequences with various shell commands: tput ... echo -e printf
e.g. echo -e '\e' > file Then open file in geany.