diff --git a/library/Icinga/Cli/Loader.php b/library/Icinga/Cli/Loader.php index f3710bbaa..0f7d2500f 100644 --- a/library/Icinga/Cli/Loader.php +++ b/library/Icinga/Cli/Loader.php @@ -278,6 +278,10 @@ class Loader if (false !== $match) { return $haystack[$match]; } + if (count($this->lastSuggestions) === 1) { + $lastSuggestions = array_values($this->lastSuggestions); + return $lastSuggestions[0]; + } return false; }