[Console] fixed regression when calling a command foo:bar if there is another one like foo:bar:baz (closes #8245)

This commit is contained in:
Fabien Potencier 2013-06-11 09:34:22 +02:00
parent 84867b78f8
commit 0c0a3e90e7

View File

@ -573,6 +573,10 @@ class Application
return $this->get($abbrevs[$searchName][0]);
}
if (isset($abbrevs[$searchName]) && in_array($searchName, $abbrevs[$searchName])) {
return $this->get($searchName);
}
if (isset($abbrevs[$searchName]) && count($abbrevs[$searchName]) > 1) {
$suggestions = $this->getAbbreviationSuggestions($abbrevs[$searchName]);