Closed andrewdeandrade closed 7 years ago
+1
Hi SBoudrias@, I notice that you are also author of this awesome repo!
How much work do you evaluate to implement this feature? If this is within reasonable time, I could implement it and send you PR for review.
I think it'd be fairly simple. A couple hours at most, but it might be more since you might need to get used to the core principles - and the core of Inquirer date from ~2 years ago, so it's not the cleanest code I've written out there.
Wow, I didn't know this almost 2 years old! So far this is most friendly module to work with terminal app.
Could you point me to some main abstractions you have defined in the core to help me start:
Oh, I think the public API is fairly simple and pretty feature complete. I was more thinking of the behind the scenes abstractions who're bloated around classes. Redoing the core code today, most of this would be in functional style as a lot of class base abstraction currently in use are not needed. But you should be able to wrap your head around it.
I think the list prompt implementation is the most similar to the suggested kind of prompt: https://github.com/SBoudrias/Inquirer.js/blob/master/lib/prompts/list.js
We use RxJS to handle user inputs https://github.com/SBoudrias/Inquirer.js/blob/master/lib/prompts/list.js#L65-L69
Then you just react to those events by writing and clearing the terminal with the new layout.
is this still in the works?
--- edit
it looks like there's an autocomplete plugin https://github.com/mokkabonna/inquirer-autocomplete-prompt
Is this request different from https://github.com/SBoudrias/Inquirer.js/pull/265, the auto-complete prompt? If so, should this be closed?
Right this is now published as a standalone plugin https://github.com/mokkabonna/inquirer-autocomplete-prompt
Maybe of interest, PR open to include such a prompt in the core https://github.com/SBoudrias/Inquirer.js/pull/1479
It would be super nice to have an autocomplete list input type which is a hybrid of the
input
andlist
input types. Having it be capable of async (so you can make remote requests and redraw the filtered options in the terminal) would be a plus.(cc: @lxe)