@@ -1092,7 +1092,7 @@ def complete_users():
10921092 self .allow_closing_quote = False
10931093
10941094 # Sort the matches before any trailing slashes are added
1095- matches . sort ( key = str . lower )
1095+ matches = utils . alphabetical_sort ( matches )
10961096 self .matches_sorted = True
10971097
10981098 # Build display_matches and add a slash to directories
@@ -1532,8 +1532,8 @@ def complete(self, text: str, state: int) -> Optional[str]:
15321532
15331533 # Sort matches alphabetically if they haven't already been sorted
15341534 if not self .matches_sorted :
1535- self .completion_matches . sort ( key = str . lower )
1536- self .display_matches . sort ( key = str . lower )
1535+ self .completion_matches = utils . alphabetical_sort ( self . completion_matches )
1536+ self .display_matches = utils . alphabetical_sort ( self . display_matches )
15371537 self .matches_sorted = True
15381538
15391539 try :
@@ -2325,12 +2325,10 @@ def _help_menu(self, verbose: bool=False) -> None:
23252325 """Show a list of commands which help can be displayed for.
23262326 """
23272327 # Get a sorted list of help topics
2328- help_topics = self .get_help_topics ()
2329- help_topics .sort (key = str .lower )
2328+ help_topics = utils .alphabetical_sort (self .get_help_topics ())
23302329
23312330 # Get a sorted list of visible command names
2332- visible_commands = self .get_visible_commands ()
2333- visible_commands .sort (key = str .lower )
2331+ visible_commands = utils .alphabetical_sort (self .get_visible_commands ())
23342332
23352333 cmds_doc = []
23362334 cmds_undoc = []
0 commit comments