AlecAivazis / survey

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

Avoid hiding the cursor in the input #345

Closed saurabhaditya closed 3 years ago

saurabhaditya commented 3 years ago

Is it possible to pull this two-line change in this library? - https://github.com/apolitis-work/survey/commit/19661d782f9c44f59df3b197f89e62ec1e3eb3e5

We found that showing the cursor was a better user experience.

AlecAivazis commented 3 years ago

Hey @saurabhaditya -

I think this kind of opinion is hard to label as "better". I think a more viable change would be to have a configuration option to hide or show the cursor, would that address your needs?

dmartin35 commented 3 years ago

Hello,

I have been able to make a PR, for adding an option to Ask, AskOne, for showing/hiding the cursor. Would a solution like that work ? https://github.com/AlecAivazis/survey/pull/348

it can be used like that:

err := survey.Ask(simpleQs, &ansmap, survey.WithShowCursor(true))

Looking forward for your thoughts on it, thanks

AlecAivazis commented 3 years ago

Closing this - its been released as part of v2.2.12