From arigo at codespeak.net Wed May 21 14:50:30 2008 From: arigo at codespeak.net (arigo at codespeak.net) Date: Wed, 21 May 2008 14:50:30 +0200 (CEST) Subject: [pyrepl-checkins] r55061 - pyrepl/trunk/pyrepl/pyrepl Message-ID: <20080521125030.3F7E31684E7@codespeak.net> 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):