title: Arrow keys not working in shell
body: <p>I'm getting started with a Laravel 5 project and trying to run some experiments using 'php artisan tinker' (psy shell), but I'm running into some weirdness. In the tinker/psy shell, pressing any of the arrow keys is printing character literals to the screen rather than performing the intended behaviour (move character for left and right, cycle recent commands for up and down).</p>
  
  <p>Up is outputting <code>^[[A</code>. 
  Down is outputting <code>^[[B</code>. 
  Right is outputting <code>^[[C</code>. 
  Left is outputting <code>^[[D</code>.</p>
  
  <p>This is probably an issue with my terminal and not a Laravel bug. I am getting the same buggy behaviour when running <code>php -a</code>.</p>
  
  <p>I am running terminal on OSX, with an xterm emulation.</p>