add CTY-3304
[spider.git] / cmd / type.pl
1 #
2 # the type command, display bulls and files
3 #
4 # Copyright (c) 1999 Dirk Koopman G1TLH
5 #
6 #
7 #
8
9 my ($self, $line) = @_;
10 my @f = split /\s+/, $line;
11 my $root = "$main::root/packclus";
12 my @out;
13 my @file;
14 my @d;
15 my @slot;
16
17 if (@f) {
18         my $fn = lc $f[0];
19         $fn =~ s([^A-Za-z0-9_/])()g;
20         $fn =~ s(^/+)();
21         $root = "$root/$fn";
22 }
23
24 open(INP, $root) or return (1, $self->msg('e3', 'type', $f[0]));
25 @out = <INP>;
26 close(INP);
27
28 return (1, @out);