From 19cab7e9c748f20a3fc0120b98ca20abca6236e0 Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Fri, 12 Mar 2010 18:50:14 -0600 Subject: [PATCH] Alphabetize command listing on --help --- src/mw/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mw/cli.py b/src/mw/cli.py index ef33d73..52df23b 100644 --- a/src/mw/cli.py +++ b/src/mw/cli.py @@ -45,7 +45,9 @@ class CLI(object): def usage(self): print 'usage: %s [subcommand]' % self.me print - for name in self.commands: + commands = self.commands.keys() + commands.sort() + for name in commands: cmd = self.commands[name] if len(cmd.shortcuts) > 0: full = name + ' (' + ' '.join(cmd.shortcuts) + ')' -- 2.39.5