AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.07k stars 349 forks source link

Ability to 'clear' terminal #486

Open Markowy opened 1 year ago

Markowy commented 1 year ago

Hi,

Is it possible to clear the terminal when a user answers a question? I mean, without showing an answer, previous questions, etc. - just a clean state. I use 'survey' non-standard way - instead of sequentially asking questions, I'm implementing a 'wizard' where a user initially sees a list of objects, with the ability to create/edit/delete one and then get back to the list.

All works fine but there is a mess on the screen caused by questions asked before. Ideally, I can control when to clear the terminal.

I went through all issues and the codebase but couldn't find an answer. Any help will be appreciated.