Author yoha
Recipients yoha
Date 2014-11-23.09:45:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1416735942.39.0.542265470543.issue22923@psf.upfronthosting.co.za>
In-reply-to
Content
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:

* run the following code: `__import__('readline').parse_and_bind('tab:complete');input()"`
* press tab twice

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:
* rlcompleter or custom completer
* versions 2.7.3, 2.7.8, 3.2.3 and 3.4.2
* bash or zsh
* tty, screen, ssh+screen, xterm, urxvt, gnome-terminal
* command-line flags -S (no `site` module), -u (unbuffered) or -Su
* being run as script, as `-c` command-line argument, or in the interactive interpreter
* `import readline;readline.` or `from readline import *` in stead of `__import__('readline').`


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.
History
Date User Action Args
2014-11-23 09:45:42yohasetrecipients: + yoha
2014-11-23 09:45:42yohasetmessageid: <1416735942.39.0.542265470543.issue22923@psf.upfronthosting.co.za>
2014-11-23 09:45:42yohalinkissue22923 messages
2014-11-23 09:45:41yohacreate