summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-12-05 19:39:50 +0100
committermathieui <mathieui@mathieui.net>2012-12-05 19:40:05 +0100
commit59be8bdd62bbbb9b57a209b005441206eb02f7cd (patch)
tree7268c46f0028a9e45478536f17d8d46f1db777bc /src
parent14cb5128b31193831921ed68fbe3f9dad0625a64 (diff)
downloadpoezio-59be8bdd62bbbb9b57a209b005441206eb02f7cd.tar.gz
poezio-59be8bdd62bbbb9b57a209b005441206eb02f7cd.tar.bz2
poezio-59be8bdd62bbbb9b57a209b005441206eb02f7cd.tar.xz
poezio-59be8bdd62bbbb9b57a209b005441206eb02f7cd.zip
Sort items in /help
Diffstat (limited to 'src')
-rw-r--r--src/core.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py
index 1a1ff433..4e17d747 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1315,12 +1315,14 @@ class Core(object):
/help <command_name>
"""
args = arg.split()
+ acc = []
if not args:
msg = _('Available commands are: ')
for command in self.commands:
- msg += "%s " % command
+ acc.append(command)
for command in self.current_tab().commands:
- msg += "%s " % command
+ acc.append(command)
+ msg += ' '.join(sorted(acc))
msg += _("\nType /help <command_name> to know what each command does")
if args:
if args[0] in self.commands: