From fea24d2de3efef33a080fe52f4ae9638477710a7 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 8 Mar 2009 14:09:58 -0700 Subject: Print correct names for completion Want the policy names, not the policy type. --- scripts/vyatta-qos.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts/vyatta-qos.pl') diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl index 0547b4b..4245e5e 100755 --- a/scripts/vyatta-qos.pl +++ b/scripts/vyatta-qos.pl @@ -94,9 +94,13 @@ sub list_policy { $config->setLevel('qos-policy'); while ( my $direction = shift ) { - my @types = - grep { defined $policies{$direction}{$_} } $config->listNodes(); - print join( ' ', @types ); + my @qos = grep { $policies{$direction}{$_} } $config->listNodes(); + my @names = (); + foreach my $type (@qos) { + my @n = $config->listNodes($type); + push @names, @n; + } + print join( ' ', @names ), "\n"; } } -- cgit v1.2.3