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
Consider this code again, using click.confirm instead of click.prompt:
importclick, readlineclick.confirm("Input")
Type anything then backspace
Actual behaviour: the entire line is erased
Expected behaviour: only the entered character is erased
Type return only
Actual behaviour: no newline is printed to the terminal (a following click.echo() or print() will appear to be ignored)
Expected behaviour: a newline is printed to the terminal
The solution from PR #1836 seems to work in the case of click.confirm as well:
whileTrue:
try:
# Write the prompt separately so that we get nice# coloring through colorama on Windowsecho(prompt.rstrip(" "), nl=False, err=err)
value=visible_prompt_func(" ").lower().strip()
Environment:
Python version: 3.8.10
Click version: 8.0.1
The text was updated successfully, but these errors were encountered:
This follows on from #665.
Consider this code again, using
click.confirm
instead ofclick.prompt
:click.echo()
orprint()
will appear to be ignored)The solution from PR #1836 seems to work in the case of
click.confirm
as well:Environment:
The text was updated successfully, but these errors were encountered: