summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-06-02 17:30:03 +0200
committermathieui <mathieui@mathieui.net>2011-06-02 17:30:03 +0200
commitfc3f6d936dd821e66ac96e9797bc7868f8d4b4db (patch)
tree586f59515280f1184455d78468e96a714339e295 /src
parentedbd07cf54fb0ba58af8c9372d462c9ae885e7a4 (diff)
downloadpoezio-fc3f6d936dd821e66ac96e9797bc7868f8d4b4db.tar.gz
poezio-fc3f6d936dd821e66ac96e9797bc7868f8d4b4db.tar.bz2
poezio-fc3f6d936dd821e66ac96e9797bc7868f8d4b4db.tar.xz
poezio-fc3f6d936dd821e66ac96e9797bc7868f8d4b4db.zip
make command case-insentitive (which means /w 1 works as fine as /W 1)
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py8
1 files changed, 7 insertions, 1 deletions
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