AlecAivazis / survey

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

Support for labels #364

Closed ctrombley closed 2 years ago

ctrombley commented 2 years ago

It would be great to provide labels for certain prompt fields such as Default, so that the value displayed to the user is different than the underlying value that is actually selected. A use case where this would be useful is a scenario where sensitive information should be obfuscated when displaying it in the terminal.

Similarly it would be nice to have this ability for Select and Multiselect option values as well.

Happy to work on a PR for this if you are open to the feature, and guidance on implementation would be welcome.

MAD-py commented 2 years ago

What a good idea, personally I think this functionality could be very useful.

AlecAivazis commented 2 years ago

Hey @ctrombley - thanks for opening this. I think you are describing #105 which a long running issue. At the moment it would require breaking the API in order to support which I'm a bit wary of doing. I know this isn't the answer you wanted but I dont think this will get added until I have a little more bandwidth to dedicate