Issue 22923: No prompt for "display all X possibilities" on completion-enabled input() (original) (raw)

When running input() (or raw_input() for Python 2) while tab-completion has been enabled using readline.parse_and_bind('tab: complete'), pressing the tab key twice display the message Display all X possibilities? (y or n) when there are more than 100 remaining possibilities (default value). However, I am not asked any input to answer the question, and readline then proceeds to display all possibilities.

Steps to reproduce:

If your current directory has more than 100 files, the message Display all X possibilities? (y or n) should show, following by a list of the files.

The bug still shows up with:

On the other hand, the C program "#include <readline/readline.h>", "main(){readline(0);}" behaves as expected: after the message is displayed, user input is waited for and typing "y" lists the possibilities, "n" resumes the line editing, and anything else is ignored.