You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would also like to change the choice separator 🙂 However, I need more customization for choices and thus I created a class deriving from PromptBase to override how the choices are created (among other things).
Currently, the choices are created within PromptBase.make_prompt() which creates the prompt including choices and default values. If you want to change the rendering of the choices, one needs to override the complete function.
Therefore, I propose extracting the choice logic into another function e.g. make_choices to improve the developer experience if you want to customize this. Regarding the separator, I could also imagine adding a class variable (similar to prompt_suffix) to allow users to customize it easily through a custom class - if for some reason you don't want a new option in the Prompt.ask function.
I am happy to add my changes to the already opened PR #3553 if maintainers agree 🙃
The default choices separator is "/", and there is no way to customise it.
Example
Otutput
I would like to customise the separator, for example.
Or
The text was updated successfully, but these errors were encountered: