r55061 - pyrepl/trunk/pyrepl/pyrepl
[email protected] Wed, 21 May 2008 14:50:30 +0200 (CEST)
| Newsgroups | gmane.comp.python.pyrepl.checkins |
|---|---|
| Message-ID | <[email protected]> |
Author: arigo
Date: Wed May 21 14:50:27 2008
New Revision: 55061
Modified:
pyrepl/trunk/pyrepl/pyrepl/readline.py
Log:
Emulate the behavior of the standard readline that sorts the possible
completions before displaying them.
Modified: pyrepl/trunk/pyrepl/pyrepl/readline.py
==============================================================================
--- pyrepl/trunk/pyrepl/pyrepl/readline.py (original)
+++ pyrepl/trunk/pyrepl/pyrepl/readline.py Wed May 21 14:50:27 2008
@@ -70,6 +70,13 @@
break
result.append(next)
state += 1
+ # emulate the behavior of the standard readline that sorts
+ # the completions before displaying them. Note that the
+ # screen order is still a bit different because pyrepl
+ # displays them in this order: and readline in this one:
+ # [A][B][C] A C E
+ # [D][E][F] B D F
+ result.sort()
return result
def get_trimmed_history(self, maxlength):