summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Shakhat <ishakhat@mirantis.com>2012-11-09 17:32:24 +0400
committerIlya Shakhat <ishakhat@mirantis.com>2012-11-09 17:32:24 +0400
commit6b1a4ee0dfab043dc3922da7e9a6a510815c3c31 (patch)
treebee303e389e59cc8d94ef1de411b674c5f36a4a7
parent9e1488f0d6a8bbacb428a7606f3622cf5fdac112 (diff)
downloadcliff-6b1a4ee0dfab043dc3922da7e9a6a510815c3c31.tar.gz
Make list of application commands lexicographically ordered for help command in interactive mode.
Before fix: Application commands (type help <topic>): ========================================= files two part list files simple show file file error help After fix: Application commands (type help <topic>): ========================================= error file files help list files show file simple two part
-rw-r--r--cliff/interactive.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cliff/interactive.py b/cliff/interactive.py
index 2d717a1..6297339 100644
--- a/cliff/interactive.py
+++ b/cliff/interactive.py
@@ -85,7 +85,7 @@ class InteractiveApp(cmd2.Cmd):
self.default(self.parsed('help ' + arg))
else:
cmd2.Cmd.do_help(self, arg)
- cmd_names = [n for n, v in self.command_manager]
+ cmd_names = sorted([n for n, v in self.command_manager])
self.print_topics(self.app_cmd_header, cmd_names, 15, 80)
return