add sh/cmd_cache
[spider.git] / cmd / show / cmd_cache.pl
1 #
2 # show the contents and paths of any commands in the cmd_cache
3 #
4 # This will tell you whether you are using the version of the command
5 # that you think you are...
6 #
7 # Copyright (c) 2007 Dirk Koopman G1TLH
8 #
9
10 my $self = shift;
11 return (1, $self->msg('e5')) if $self->priv < 9;
12
13 my @out = sprintf "%-20s %s", "Command", "Path";
14 for (sort keys %cmd_cache) {
15         my $v = $cmd_cache{$_};
16         $v =~ s|,|/|g;
17         push @out, sprintf "%-20s %s", $_, "$v.pl";
18 }
19
20 return (1, @out);