title: std::getline from std::cin - input history by up/down button not working in linux
body: <p>Console program receiving user input line by line using this code </p>
  
  <pre><code>while ( _run ) { 
      std::cout &lt;&lt; "\n &gt; ";
      std::string cmd = "";
      std::getline(std::cin, cmd);
      /* do something */
  }
  </code></pre>
  
  <p>If user want to repeat previous line, he/she will use up/down keyboard keys to navigate to. In windows it works fine, but in Linux i see this characters instead of previous line:</p>
  
  <pre><code>^[[A - for up key
  ^[[B - for down key
  ^[[C - for right key
  ^[[D - for left key
  </code></pre>
  
  <p>Also not working navigation in current line with left/right keyboard buttons.</p>
  
  <p>How to fix it?</p>