Question: I have a simple readline shell written in Coffeescript:

```coffee
rl = require 'readline'
cli = rl.createInterface process.stdin, process.stdout, null
cli.setPrompt "hello> "

cli.on 'line', (line) ->
  console.log line
  cli.prompt()

cli.prompt()

```

Running this displays a prompt:

```
$ coffee cli.coffee 
hello> 

```

I would like to be able to hit `Ctrl-L` to clear the screen. Is this possible?

I have also noticed that I cannot hit `Ctrl-L` in either the **node** or **coffee** REPLs either.

I am running on Ubuntu 11.04.

Answer: 
Try also:

```
var rl = require('readline');
rl.cursorTo(process.stdout, 0, 0);
rl.clearScreenDown(process.stdout);

```
If you are using `readline.createInterface` you could do something like:

```js
function clearPrompt() {
  rl.setPrompt("");
  rl.prompt();
}

```

Note this won't clear the entire terminal, just the readline prompt. Still useful if you want the user to keep their place in the terminal