cronvel / terminal-kit

Terminal utilities for node.js
MIT License
3.11k stars 201 forks source link

Any references to run the term.inputField in a loop #157

Closed dineshkumar02 closed 3 years ago

dineshkumar02 commented 3 years ago

Hi Everyone,

This terminal-kit is an awesome framework, and we are trying to build a solution using this framework. But, we are facing issues, on how we run the term.inputField after every time the user submit his request.

After processing the user request, we print the response on the console and will give the prompt back to him/her to take more inputs.

Would you please share any document references or examples for the same.

cronvel commented 3 years ago

@dineshkumar02 Which issue? This should work well. I suggest you to use an async function with a loop, awaiting for .inputField( options ).promise. Got it working on various situation.

dineshkumar02 commented 3 years ago

@cronvel , thanks for suggestions. I have made the function call in the callback, and it is working fine.