manifoldco / promptui

Interactive prompt for command-line applications
https://www.manifold.co
BSD 3-Clause "New" or "Revised" License
6.03k stars 333 forks source link

Replace input text while typing #215

Open mochi-co opened 1 year ago

mochi-co commented 1 year ago

Hi all

I was wondering if there was a way to replace the text inputted, on keyup event.

As a simple example - I type "abc", I would like to run the whole string through a function, and replace it with the returned value (such as uppercase): "ABC" as I type it.

Many thanks