User:AJFarmar: Difference between revisions
Content added Content deleted
(→Ruby) |
|||
Line 35: | Line 35: | ||
dummy.w 0..2 #=>"Hello my deary," |
dummy.w 0..2 #=>"Hello my deary," |
||
</lang> |
</lang> |
||
===<code>clear</code>:=== |
|||
This was a clear-screen function, mainly for IRB environment in the UNIX terminal. In fact, there's already a UNIX command, <code>clear</code> that clears your screen. |
|||
So, I tried this: |
|||
<lang ruby> |
|||
`clear` #=> "\e[H\e[2J" |
|||
</lang> |
|||
It was clearly an ANSI escape sequence. I did some more searching, and found her[[this wonderful page]]. |