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
{{ message }}
Repository navigation
click.prompt and click.confirm argument prompt_suffix no longer works when suffix is empty #3019
Notice that when a prompt_suffix of ""is passed, there is no suffix after the prompt text oftest. This is illustrated by how the text typed by the user (in this case foo`) displays immediately after the prompt without a space character.
This matters because it makes it impossible to do prompts like the following example
Example
importclickclick.prompt("What IP address would you like? : 192.168.1.", prompt_suffix="")
This would have the user enter the last octet of an IP and make it clear that they can only set something within the displayed subnet. The problem is that the resulting display looks like this
What IP address would you like? : 192.168.1. 123
Note
The fixes in these two PRs can't just be reverted because the readline behavior that inspired them still exists.
changed the title [-]click.prompt argument prompt_suffix no longer works when suffix is empty[/-][+]click.prompt and click.confirm argument prompt_suffix no longer works when suffix is empty[/+]on Jul 28, 2025
Activity
[-]click.prompt argument prompt_suffix no longer works when suffix is empty[/-][+]click.prompt and click.confirm argument prompt_suffix no longer works when suffix is empty[/+]Fix rendering when `prompt_suffix` is empty