From fc3f6d936dd821e66ac96e9797bc7868f8d4b4db Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 2 Jun 2011 17:30:03 +0200 Subject: make command case-insentitive (which means /w 1 works as fine as /W 1) --- src/tabs.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tabs.py b/src/tabs.py index 5edbac7c..12bf08be 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -140,7 +140,13 @@ class Tab(object): elif command in self.core.commands: # check global commands self.core.commands[command][0](arg) else: - self.core.information(_("Unknown command (%s)") % (command), _('Error')) + low = command.lower() + if low in self.commands: + self.commands[low][0](arg) + elif low in self.core.commands: + self.core.commands[low][0](arg) + else: + self.core.information(_("Unknown command (%s)") % (command), _('Error')) return True else: return False -- cgit v1.2.3