title: Fixed position command prompt in Node.js
body: <p>Is there a way to have a command prompt (just a <a href="http://nodejs.org/api/readline.html#readline_rl_question_query_callback" rel="noreferrer"><code>question</code></a> prompt, or something similar) fixed to the bottom of the Terminal, and to log output above it, using <a href="http://nodejs.org/" rel="noreferrer">Node.js</a>.</p>
  
  <p>A really bad example:</p>
  
  <pre class="lang-none prettyprint-override"><code>Your favourite food is sushi.
  Your favourite food is chicken.
  Your favourite food is okra.
  --&gt; What is your favourite food?
  </code></pre>
  
  <p>So essentially, I'm looking to have the user always able to type, and have input echoed above the prompt.</p>
  
  <pre class="lang-js prettyprint-override"><code>interface.question("What is your favourite food?", function(answer) {
      // output the answer above where this prompt was
      // and somehow keep this same prompt where is is
  });
  </code></pre>
  
  <p>The particular application I'm hoping to use this in is a simple IRC client, where I have a spot for the user to type, and have all the output (what the user has typed, and what others have also typed) outputted above where the user is typing. The lines in the diagram below are imaginary.</p>
  
  <pre class="lang-none prettyprint-override"><code>----------------------------------------------------------------------
  |                                                                    |
  |                                                                    |
  |                                                                    |
  |                                                                    |
  |                                                                    |
  |                                                                    |
  |                                                                    |
  | Stuff                                                              |
  | Stuff                                                              |
  | Stuff                                                              |
  ----------------------------------------------------------------------
  | --&gt; The user can type here                                         |
  ----------------------------------------------------------------------
  </code></pre>