X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fcmd_cache.pl;h=5e7fd9ec8f11d1d9566fc6a8b15e1953a6f2e327;hb=refs%2Fheads%2Fstaging;hp=bd26c7d88dfd103ba4d7b7050f33f102b308f1fe;hpb=d7854d2dceaec16989218681be28f6f48a3c3c4a;p=spider.git diff --git a/cmd/show/cmd_cache.pl b/cmd/show/cmd_cache.pl index bd26c7d8..5e7fd9ec 100644 --- a/cmd/show/cmd_cache.pl +++ b/cmd/show/cmd_cache.pl @@ -8,11 +8,13 @@ # my $self = shift; +my $line = shift; return (1, $self->msg('e5')) if $self->priv < 9; my @out = sprintf "%-20s %s", "Command", "Path"; -for (sort keys %cmd_cache) { - my $v = $cmd_cache{$_}; +for (sort keys %DXCommandmode::cmd_cache) { + next if $line && $_ !~ m|\Q$line|i; + my $v = $DXCommandmode::cmd_cache{$_}; $v =~ s|,|/|g; push @out, sprintf "%-20s %s", $_, "$v.pl"; }