summaryrefslogtreecommitdiff
path: root/bin/icli
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-07-30 00:39:28 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-07-30 00:39:28 +0200
commite8d4fa8c1cacc4062a573c46ced2e7c1ee25212a (patch)
treeb0fbde7c3b6fa09d6b750c662fea0ebbd7ab31df /bin/icli
parente22b73286bbf862090785adf022093dab751f62d (diff)
icli -lq: Support filtering output with -h/-g
Diffstat (limited to 'bin/icli')
-rwxr-xr-xbin/icli6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/icli b/bin/icli
index 4721990..bfb959c 100755
--- a/bin/icli
+++ b/bin/icli
@@ -131,6 +131,10 @@ sub display_queue {
(values %{$data->{hosts}},
map { @{$_} } values %{$data->{services}});
+ if (@for_hosts) {
+ @queue = grep { $_->{host_name} ~~ \@for_hosts } @queue;
+ }
+
printf(
"%-25.25s %-20.20s %-19s %-19s\n",
'Host',
@@ -239,7 +243,7 @@ foreach my $group (@for_groups) {
}
}
-if (@for_hosts) {
+if (@for_hosts and $list_type ~~ [qw/s h/]) {
foreach my $host (@for_hosts) {
if (have_host($host)) {
display_host(