mokkabonna / inquirer-autocomplete-prompt

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

feat: export rl as third argument for suggesting matched text #73

Closed imcuttle closed 4 years ago

imcuttle commented 5 years ago

In my case, I want to match #123 in all text and suggest it to be {prefix}-123{suffix}

But now, It just supports for extract text (e.g. #123), instead of closes #123,#456 etc.

So the PR resolved it. the results show as below

Other Refactor

mokkabonna commented 4 years ago

I think this could be accomplished with the existing functionality. Did some tests and I created something similar to your example.

I don't think I want to expose rl really. If a case could be made for exporting the current position of the cursor, maybe I'll do that. But for this example you can just indexof the #

mokkabonna commented 4 years ago

That svg is really nice, may I ask what tool you used to create that? Hyper terminal? Some plugin to that?