summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core.py b/src/core.py
index 6766ef6a..d57605fa 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1362,15 +1362,17 @@ class Core(object):
msg = '\n'.join(buff)
msg += _("\nType /help <command_name> to know what each command does")
if args:
- if args[0] in self.commands:
- tup = self.commands[args[0]]
- elif args[0] in self.current_tab().commands:
- tup = self.current_tab().commands[args[0]]
+ command = args[0].lstrip('/').strip()
+
+ if command in self.commands:
+ tup = self.commands[command]
+ elif command in self.current_tab().commands:
+ tup = self.current_tab().commands[command]
else:
- self.information(_('Unknown command: %s') % args[0], 'Error')
+ self.information(_('Unknown command: %s') % command, 'Error')
return
if isinstance(tup, Command):
- msg = _('Usage: /%s %s\n' % (args[0], tup.usage))
+ msg = _('Usage: /%s %s\n' % (command, tup.usage))
msg += tup.desc
else:
msg = tup[1]