Friday 23 March 2012

Funny console

If you need to retrieve what happened on your console, you can read system/console/history:

>> print "Hello world"
Hello world
>> print system/console/history
print system/console/history print "Hello world"


You can modify your console, just look a this:

>> print system/console
history: ["print system/console" "print system/console/history" {print "Hello world"}]
keys: none
prompt: ">> "
result: "== "
escape: "(escape)"
busy: "|/-\"
tab-size: 4
break: true
lookup: func [
"Console filename completion lookup."
file /value
][
if #"/" <> last file [file: first split-path file]
attempt [read file]
]

You can change the prompt symbol, the result symbol, the busy simbols, the tab size and lot more, try this:

system/console/prompt: "At your order, Master> "

No comments:

Post a Comment