JEG2 / highline

A higher level command-line oriented interface.
Other
1.29k stars 137 forks source link

Agree default option not working when character is set #192

Closed maurobender closed 8 years ago

maurobender commented 8 years ago

When character option is set to true for an agree question the default option is ignored

Example:

agree('Do you agree? (yes/no) ', true) {  |q| q.default = 'no' }

Ouput:

Do you agree? (yes/no) |no| _

But when a hit Enter it says that the chosen option is not valid and prompt me again with the same question.

abinoam commented 8 years ago

Hi @maurobender,

This is affecting only the stable branch. Please try to install the pre-release version with gem install --pre highline I'm closing this issue as solved. Feel free to reopen it if you need.