Skip to content

Click prompts do not cooperate with readline module #665

Description

@gumho

When readline is imported and a user presses backspace during a Click prompt, the entire prompt message is erased and cursor goes to beginning of the line. This can be reproduced with the following code:

import click, readline
click.prompt("Input")

This is due to Python issue 12833. The official recommendation is that the prompt should be displayed with raw_input. I noticed that Click first displays the prompt message using echo() and then uses raw_input("") for the prompt. There is also a workaround by passing " " to raw_input, however, that may be ugly in the display.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions