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.
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.
On 2022-12-07 12:11, D.T. via Users wrote:
Do you want to type out that exact symbol in geany's editor?
Yes. There should be some way of entering a hex value.
You can copy-paste it though.
I know, but still, one would think there would be some way of typing it in.
echo -e '\e' > file Then open file in geany.
Sure, I can get it done various ways but it's hard to believe all that workaround is needed.
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
On Thu, 8 Dec 2022 at 07:44, Ray Andrews via Users users@lists.geany.org wrote:
On 2022-12-07 12:11, D.T. via Users wrote:
Do you want to type out that exact symbol in geany's editor?
Yes. There should be some way of entering a hex value.
You can copy-paste it though.
I know, but still, one would think there would be some way of typing it in.
ctrl+shift+u hex code enter for any Unicode value
Cheers Lex
echo -e '\e' > file Then open file in geany.
Sure, I can get it done various ways but it's hard to believe all that workaround is needed.
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Hey there,
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.
There's more than one way to do it. Here are a couple of examples:
echo -e "\033[32mThis is in green\033[0m"
echo -e "$(tput setaf 2)This is in green$(tput sgr0)"
You might like this page:
https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-o...