Sort items in /help

This commit is contained in:
mathieui 2012-12-05 19:39:50 +01:00
parent 14cb5128b3
commit 59be8bdd62

View file

@ -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: