spectre.console icon indicating copy to clipboard operation
spectre.console copied to clipboard

Allow text prompt choices / selection to take keyvalue pairs for display and value

Open ronnyek opened this issue 5 months ago • 1 comments

As a preference, I tried searching for this scenario... and dug through documentation. I am open to other ways of achieving this... but I can say my use case does require the dynamic building of these prompts. At the code level, I wont know what the options will be, or what the default value would be

Is your feature request related to a problem? Please describe. I'd like to display a prompt of dynamic items that are currently value and description. I want to display both the value as the user would be typing in the value, but present the description.

Describe the solution you'd like Ideally I'd like to list the possible choices with their key value pairs like so

Delivery Requirements  [R - Require Recipient Verification, B - Bypass Verification] (R):

And ultimately have the response be just the key (in this case R or B)

Describe alternatives you've considered I mean I can manually build the description and present the list of options, and then have the user input only take the possible values


Please upvote :+1: this issue if you are interested in it.

ronnyek avatar Jul 16 '25 15:07 ronnyek

I mean if this is something that is considered reasonable for inclusion, I'd be willing to take a look at it and potentially create a pull request

ronnyek avatar Jul 17 '25 13:07 ronnyek