diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-19 18:12:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 18:12:06 -0400 |
commit | 2df4639cad9e627b97f2c7094a85435be25c697e (patch) | |
tree | eb801ebbfeca5f6abb49a981c150ba0d6c320360 /cmd2/cmd2.py | |
parent | ccbe1276f786e94f1996877fdec6d070705f5ab8 (diff) | |
parent | 25e388cc78002f78e93b946367b883a4802cfd4e (diff) | |
download | cmd2-git-2df4639cad9e627b97f2c7094a85435be25c697e.tar.gz |
Merge branch 'master' into colorize
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index da5b528a..9f68a3d9 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -1114,8 +1114,8 @@ class Cmd(cmd.Cmd): self.allow_appended_space = False self.allow_closing_quote = False - # Sort the matches before any trailing slashes are added - matches = utils.alphabetical_sort(matches) + # Sort the matches alphabetically before any trailing slashes are added + matches.sort(key=utils.norm_fold) self.matches_sorted = True # Build display_matches and add a slash to directories @@ -1555,8 +1555,8 @@ class Cmd(cmd.Cmd): # Sort matches alphabetically if they haven't already been sorted if not self.matches_sorted: - self.completion_matches = utils.alphabetical_sort(self.completion_matches) - self.display_matches = utils.alphabetical_sort(self.display_matches) + self.completion_matches.sort(key=utils.norm_fold) + self.display_matches.sort(key=utils.norm_fold) self.matches_sorted = True try: |