mokkabonna / inquirer-autocomplete-prompt

Autocomplete prompt for inquirer
ISC License
350 stars 82 forks source link

Feature Request: Support initial search text #18

Closed tjbenton closed 7 years ago

tjbenton commented 7 years ago

I'm currently using a command line api that allows you to pass in a name to identify which projected the user wants to compile, and if the user passes is s as their name argument it's not going to match anything in the exactly but it would reduce the initial list that's displayed if I could pass in an initial option that would be the first thing passed into the source function instead of null

Here's some screenshots of what I'm talking about.

Currently this is what's happening. If the user passes in a name that's not an exact match my app will return throw that warning and run the auto complete prompt, and the list is untouched.

current

Here's what I would like it to look like if there was a initial search term. Where the initial search term was s and it shows the matched results based off of s.

proposed

mokkabonna commented 7 years ago

See comment on linked PR