GithubHelp home page GithubHelp logo

Comments (7)

mhkeller avatar mhkeller commented on June 9, 2024

This seems to be working. Did I miss anything? mhkeller@38c0f0a

from inquirer-autocomplete-prompt.

mokkabonna avatar mokkabonna commented on June 9, 2024

That was my thought as well. As you noticed this plugin currently forces you to choose a predefined one. But I also see the usefulness of being able to type anything you want. I was eventually planning to either support it with an option or create a stand alone plugin.

But don't know when I'll have the time to complete that, so if you create it, that is great!

Your changes seems to be the gist of it, although with your changes it seems that you only will be able to select something custom when the search string does not match anything. so you will not be able to enter "cookie" as a value if you have "cookie monster" in the list. Correct?

I would assume in such a plugin tabbing would autocomplete the selected choice, and enter would use whatever value you have typed, either your own or the autocompleted one.

Like so:

cookie => (tab) => cookie monster => (enter) => selects cookie monster
cookie => (enter) => cookie

Also, thanks for the interest and issue/PR reporting! I have had limited time to give this plugin enough love.

from inquirer-autocomplete-prompt.

mhkeller avatar mhkeller commented on June 9, 2024

Ah ya I hadn't thought of that one. There might need to be a larger UI change in order to disambiguate when you want "cookie" to autocomplete to "Cookie Monster".

I don't have that use case currently. so for now I'll look at integrating this set up as an option and PR.

Le Nov 7, 2015 à 06:40, Martin Hansen [email protected] a écrit :

That was my thought as well. As you noticed this plugin currently forces you to choose a predefined one. But also see the usefulness of being able to type anything you want. Was eventually planning to either support it with an option or create a stand alone one.

But don't know when I'll have the time to complete that, so if you create it, that is great!

That looks like the gist of it, although with your changes it seems that you only will be able to select something custom when it does not match anything. so you will not be able to enter "cookie" as a value if you have "cookie monster" in the list. Correct?


Reply to this email directly or view it on GitHub.

from inquirer-autocomplete-prompt.

mhkeller avatar mhkeller commented on June 9, 2024

I didn't see your flow layout above when I read this on my phone. Ya that seems reasonable although would "cookie monster" appear selected in the list after typing "cookie" before hitting tab?

Another way to do it is always display the arbitrary input in the list and preface it with some text or in a different style so the user knows it is not a part of the main list.

from inquirer-autocomplete-prompt.

Naramsim avatar Naramsim commented on June 9, 2024

@mhkeller could you open a PR with your changes? So the users now are not forced to choose one option?

from inquirer-autocomplete-prompt.

Naramsim avatar Naramsim commented on June 9, 2024

Or this PR does the same?
#9

from inquirer-autocomplete-prompt.

mokkabonna avatar mokkabonna commented on June 9, 2024

Closed in favor of #9 . It is now merged and published.

from inquirer-autocomplete-prompt.

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.