[erlang-questions] erlang-questions Digest, Vol 24, Issue 15
Per Melin
per.melin@REDACTED
Mon May 4 18:51:16 CEST 2009
Alpár Jüttner:
>> And I'm still curious to learn how you'd go about putting the cursor top
>> left without sending some sort of control codes.
>
> Can anyone tell me how to to it _with_ using VT codes? I tried to clear
> the screen using the VT100 controll sequence (ESC [2J), but to no avail:
>
> $ erl
> Erlang R13B (erts-5.7.1) [source] [smp:2:2] [rq:2] [async-threads:0]
> [hipe] [kernel-poll:false]
>
> Eshell V5.7.1 (abort with ^G)
> 1> io:put_chars([27|"[2J"]).
> ^[[2Jok
> 2>
You can't. The shell gets in the way and turns your control characters
into a printable representation. It's been discussed before on this
list.
This works though:
$ erl -noshell -eval 'io:put_chars([27|"[2J"]).' -s init stop
But that helps no one.
More information about the erlang-questions
mailing list