hostmanager: Add support for 'disco_hidden' option to hide hosts from disco#items (thanks Ge0rG)
--- a/core/hostmanager.lua Mon Sep 18 18:35:01 2017 +0200
+++ b/core/hostmanager.lua Wed Sep 20 14:42:21 2017 +0100
@@ -100,7 +100,7 @@
host_session.type = "component";
end
hosts[host] = host_session;
- if not host:match("[@/]") then
+ if not host_config.disco_hidden and not host:match("[@/]") then
disco_items:set(host:match("%.(.*)") or "*", host, host_config.name or true);
end
for option_name in pairs(host_config) do