From 36b26f77e760a3f33d8fb9027afcd7a1b084b719 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Thu, 17 Jul 2014 09:58:07 -0700 Subject: [PATCH] Sort help output Commands are now listed in sorted order. (With Python's hash randomization, the order was changing on every execution!) --- beets/ui/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index be9a48603..1e64cd89c 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -724,6 +724,7 @@ class SubcommandsOptionParser(optparse.OptionParser): disp_names = [] help_position = 0 subcommands = [c for c in self.subcommands if not c.hide] + subcommands.sort(key=lambda c: c.name) for subcommand in subcommands: name = subcommand.name if subcommand.aliases: