[erlang-questions] ANSI escape sequences in the erlang shell

Andrew Thompson andrew@REDACTED
Thu Apr 2 15:15:18 CEST 2009


Is there a reason the erlang shell is making my attempts to print ANSI
escape sequences (specifically the color codes) fail? I've tried
io:format with both \e, inlining the ctrl-esc manually (using
ctrl-v in vim) and using \033 (the ASCII octal code for the escape).
None of these get me color in the shell, I just see the ^[[31m or
whatever.

It was my impression that the terminal caught those sequences and
converted them to color codes - what is the shell doing to the control
sequences that's preventing them from working?

Oh, while writing this email I found this:
http://erlang.org/pipermail/erlang-questions/2008-June/036005.html which
explains that the shell is escaping the sequences and making them show
as plain text. Is there any chance of getting part of this patch merged,
at least enough to let the shell not escape the escape character?

Andrew



More information about the erlang-questions mailing list