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

Andrew Thompson <>
Thu Apr 2 16:59:16 CEST 2009


On Thu, Apr 02, 2009 at 03:36:39PM +0200, David Sveningsson wrote:
> It is at least working for me when I'm using -noshell and -run.
> 

Yes, something like 

erl -noshell -eval 'io:format("\e[31mhi\e[0m").'

works, but it's nice to have the interactive shell at the same time. And
it looks like a pretty trivial fix (in the message linked in the
original post; I think it's just the stuff in the patch that
specialcases ASCII code 27). I haven't actually tested that though.

Andrew



More information about the erlang-questions mailing list