New submission from Yoha:
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.
----------
components: IO, Library (Lib)
messages: 231550
nosy: yoha
priority: normal
severity: normal
status: open
title: No prompt for "display all X possibilities" on completion-enabled input()
type: behavior
versions: Python 2.7, Python 3.2, Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22923>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com