Giter Site home page Giter Site logo

Comments (9)

abinoam avatar abinoam commented on July 18, 2024

Hi @ailisp,

Thanks for reporting the issue.
What exactly is happening on your setup?
What behaviour is inconsistent?

from highline.

ailisp avatar ailisp commented on July 18, 2024

Hi @abinoam Thanks for quick response. In a clone of current master branch. save the content I provide in previous comment as test.rb:

[boyao@new-host highline]$ bundler exec ./test.rb
agree readline=true?aaa
Please enter "yes" or "no".
agree readline=true?
agree readline=true?
Please enter "yes" or "no".
agree readline=true?
agree readline=true?yes
agree readline=false?
aaa
Please enter "yes" or "no".
agree readline=false?

Please enter "yes" or "no".
agree readline=false?
yes

I input aaa, nothing and yes for both case (readline=true or false), and you can see with readline=true there's no extra newline after question, but a redundant question.
For choose, if we have readline=true then giving an invalid input, the question and menu will both display again, but for readline=false only question will display again.

from highline.

abinoam avatar abinoam commented on July 18, 2024

I think I understood.

I've had a quick look at the code now and couldn't figure out a quick fix.
I'll try to take a look at it next week and try to fix it or at least provide a way to work around it.

👍

from highline.

abinoam avatar abinoam commented on July 18, 2024

I see that the use of readline = true at agree is pretty much unimplemented.
It doesn't even autocomplete for yes or no.

from highline.

ailisp avatar ailisp commented on July 18, 2024

Yes. just noticed the auto complete part is not implemented. And here's of some hacks I did for make choose and agree looks the same as readline=false, it works but with some ugly hacks so I don't make a PR here direcly. I think you're more familiar with GNU Readline, but hope this can save you some time.

from highline.

abinoam avatar abinoam commented on July 18, 2024

@ailisp Could you please have a look at PR #222 ?

from highline.

ailisp avatar ailisp commented on July 18, 2024

@abinoam Just tested with ask and choose, readline=true works consistently as expected and ompletion also works. Thanks for the fix!

from highline.

abinoam avatar abinoam commented on July 18, 2024

Thank you very much @ailisp! I'll merge it and release it. 👍

from highline.

abinoam avatar abinoam commented on July 18, 2024

Released https://rubygems.org/gems/highline/versions/2.0.0.pre.develop.14

from highline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.