Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Terminal input-output handling is dark and mysterious art. Anyone trying to make colorized output of <code>bash</code> work in windows <code>PowerShell</code> via <code>ssh</code> knows that. <em>(And various shortcutting habits like Ctrl+Backspace only make things worse.)</em></p> <p>One of the possible reasons for your problem is special characters handling. Every terminal out there can type characters in number of different modes, and it parses its own output in search for certain character sequences in order to toggle states.</p> <p>F.e. <a href="http://ascii-table.com/ansi-escape-sequences.php" rel="nofollow">here</a> one can find ANSI escape code sequences, one of possible supported standards among different kind of terminals.</p> <p>See there <code>Esc[5;45m</code>? That will make all the following output to blink on magenta background. And there is significantly more stuff like that out there.</p> <p>So, the answer to your question taken literally is — your <code>choice</code> command messes something with output modes using special escape sequences, and ruby's gets breaks in that quirk special mode of terminal operation.</p> <p>But more useful will be the link to <a href="http://highline.rubyforge.org/doc/" rel="nofollow">HighLine gem documentation</a>. Why one might want to implement platform-specific and obtrusive behavior when it is possible to implement the same with <a href="https://gist.github.com/botimer/2891186" rel="nofollow">about 12 LOC</a>? <em>All the respect for the Gist goes to <strong>botimer</strong>, I've only stumbled into his code using search.</em></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload