简体   繁体   中英

Highline ask method won't use same line

Setup:

  • Bash
  • Ruby 1.9.2
  • highline (1.6.13)

Description:

I'm fairly used to highline with some other projects, but haven't used it in a few months. Now, on a fresh install on Ruby 1.9.2, it doesn't seem to allow prompts to be answered on the same line.

So previously I would see something like:

 require "highline/import"
 ask "What is your favorite color?"

And get:

 What is your favorite color? |

Now I see something like:

 What is your favorite color?
 |

Where the pipe (|) symbol is my terminal cursor.

Any ideas why this change has occurred?

在问题字符串的末尾添加一个空格,例如

ask "What is your favorite color? "

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM