[icinga-checkins] icinga.org: icingaweb2/master: icingacli: repair command and action shortcuts

git at icinga.org git at icinga.org
Wed Feb 10 13:42:50 CET 2016


Module: icingaweb2
Branch: master
Commit: 9c592ead239d89b6d41982fe91226083e38844a2
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=9c592ead239d89b6d41982fe91226083e38844a2

Author: Alexander A. Klimov <alexander.klimov at netways.de>
Date:   Wed Feb 10 13:28:34 2016 +0100

icingacli: repair command and action shortcuts

refs #11120

---

 library/Icinga/Cli/Loader.php |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/library/Icinga/Cli/Loader.php b/library/Icinga/Cli/Loader.php
index f3710bb..0f7d250 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;
     }
 



More information about the icinga-checkins mailing list