Fix priority for command completion

(tab command > core command)
This commit is contained in:
mathieui 2011-11-14 20:05:13 +01:00
parent 920c43dae2
commit e4dccc8d8f

View file

@ -152,10 +152,10 @@ class Tab(object):
if len(txt.split()) > 1 or\ if len(txt.split()) > 1 or\
(txt.endswith(' ') and not the_input.last_completion): (txt.endswith(' ') and not the_input.last_completion):
command_name = txt.split()[0][1:] command_name = txt.split()[0][1:]
if command_name in self.core.commands: if command_name in self.commands:
command = self.core.commands[command_name]
elif command_name in self.commands:
command = self.commands[command_name] command = self.commands[command_name]
elif command_name in self.core.commands:
command = self.core.commands[command_name]
else: # Unknown command, cannot complete else: # Unknown command, cannot complete
return False return False
if command[2] is None: if command[2] is None: