2

Is there any way to clear a Rebol console? (Maybe there are too many things in the console and I don't want to open a new one ;-) or I need to print some things in a clear console).

I know we can call cls in Windows or clear in Linux to clear the console. But how can I do it in Rebol, just in console or some script files?

In Rebol, I know we can do a system call with something like call "cmd". But call "cls" doesn't work.

Wayne Cui
  • 835
  • 7
  • 15

3 Answers3

3

This works also with

print "^L"

and there is a complete terminal control dialect available

sqlab
  • 6,412
  • 1
  • 14
  • 29
2

Here is an answer that works with Rebol 2. I haven't taken the plunge to R3 yet.

print "^(1B)[J"

This reference to rebol console commands might be helpful.

http://www.rebol.com/docs/core23/rebolcore-18.html

Brock
  • 33
  • 8
1

In my systems simply hit Ctrl-L. But may depends on terminal....

giuliolunati
  • 766
  • 5
  • 14
  • Quick answer! Thx! The idea occurs to me when I want to write a script in which clearing console will be better. I searched and found a python solution: http://stackoverflow.com/questions/517970/how-to-clear-python-interpreter-console , and I think Rebol should be able do this too. :-) – Wayne Cui Apr 25 '14 at 01:44